DbViewer: before resetting all changes, added a confirmation message box!

This commit is contained in:
matlabbe
2020-11-21 16:15:27 -05:00
parent fb206b4f1e
commit 7c4d2bbdf4

View File

@@ -4060,6 +4060,12 @@ void DatabaseViewer::refineAllLinks(const QList<Link> & links)
progressDialog->appendText("Refining links finished!"); progressDialog->appendText("Refining links finished!");
} }
} }
void DatabaseViewer::resetAllChanges()
{
if(QMessageBox::question(this,
tr("Reset all changes"),
tr("You are about to reset all changes you've made so far, do you want to continue?"),
QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes | QMessageBox::No,
QMessageBox::No) == QMessageBox::Yes) QMessageBox::No) == QMessageBox::Yes)
{ {
@@ -4070,6 +4076,7 @@ void DatabaseViewer::resetAllChanges()
generatedLocalMapsInfo_.clear(); generatedLocalMapsInfo_.clear();
modifiedLaserScans_.clear(); modifiedLaserScans_.clear();
updateLoopClosuresSlider(); updateLoopClosuresSlider();
this->updateGraphView();
} }
} }