diff --git a/guilib/src/GraphViewer.cpp b/guilib/src/GraphViewer.cpp index 00147ae8..70378a19 100644 --- a/guilib/src/GraphViewer.cpp +++ b/guilib/src/GraphViewer.cpp @@ -393,6 +393,7 @@ void GraphViewer::updateMap(const cv::Mat & map8U, float resolution, float xMin, _gridMap->setRotation(90); _gridMap->setPixmap(QPixmap::fromImage(image)); _gridMap->setPos(-yMin, -xMin); + this->scene()->setSceneRect(this->scene()->itemsBoundingRect()); // Re-shrink the scene to it's bounding contents } else { @@ -468,6 +469,7 @@ void GraphViewer::clearMap() { _gridMap->setPixmap(QPixmap()); _gridCellSize = 0.0f; + this->scene()->setSceneRect(this->scene()->itemsBoundingRect()); // Re-shrink the scene to it's bounding contents } void GraphViewer::clearPosterior() diff --git a/guilib/src/MainWindow.cpp b/guilib/src/MainWindow.cpp index daf479d8..0c2d9bad 100644 --- a/guilib/src/MainWindow.cpp +++ b/guilib/src/MainWindow.cpp @@ -503,7 +503,7 @@ void MainWindow::closeEvent(QCloseEvent* event) { QMessageBox::Button b=QMessageBox::question(this, tr("RTAB-Map"), - tr("There are unsaved changes. Save them?"), + tr("There are unsaved changed settings. Save them?"), QMessageBox::Save | QMessageBox::Cancel | QMessageBox::Discard); if(b == QMessageBox::Save) {