mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 01:50:24 +08:00
fixed GraphView scene size to include the grid map too
This commit is contained in:
@@ -393,6 +393,7 @@ void GraphViewer::updateMap(const cv::Mat & map8U, float resolution, float xMin,
|
|||||||
_gridMap->setRotation(90);
|
_gridMap->setRotation(90);
|
||||||
_gridMap->setPixmap(QPixmap::fromImage(image));
|
_gridMap->setPixmap(QPixmap::fromImage(image));
|
||||||
_gridMap->setPos(-yMin, -xMin);
|
_gridMap->setPos(-yMin, -xMin);
|
||||||
|
this->scene()->setSceneRect(this->scene()->itemsBoundingRect()); // Re-shrink the scene to it's bounding contents
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -468,6 +469,7 @@ void GraphViewer::clearMap()
|
|||||||
{
|
{
|
||||||
_gridMap->setPixmap(QPixmap());
|
_gridMap->setPixmap(QPixmap());
|
||||||
_gridCellSize = 0.0f;
|
_gridCellSize = 0.0f;
|
||||||
|
this->scene()->setSceneRect(this->scene()->itemsBoundingRect()); // Re-shrink the scene to it's bounding contents
|
||||||
}
|
}
|
||||||
|
|
||||||
void GraphViewer::clearPosterior()
|
void GraphViewer::clearPosterior()
|
||||||
|
|||||||
@@ -503,7 +503,7 @@ void MainWindow::closeEvent(QCloseEvent* event)
|
|||||||
{
|
{
|
||||||
QMessageBox::Button b=QMessageBox::question(this,
|
QMessageBox::Button b=QMessageBox::question(this,
|
||||||
tr("RTAB-Map"),
|
tr("RTAB-Map"),
|
||||||
tr("There are unsaved changes. Save them?"),
|
tr("There are unsaved changed settings. Save them?"),
|
||||||
QMessageBox::Save | QMessageBox::Cancel | QMessageBox::Discard);
|
QMessageBox::Save | QMessageBox::Cancel | QMessageBox::Discard);
|
||||||
if(b == QMessageBox::Save)
|
if(b == QMessageBox::Save)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user