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

@@ -4061,14 +4061,21 @@ void DatabaseViewer::refineAllLinks(const QList<Link> & links)
}
}
void DatabaseViewer::resetAllChanges()
{
linksAdded_.clear();
linksRefined_.clear();
linksRemoved_.clear();
generatedLocalMaps_.clear();
generatedLocalMapsInfo_.clear();
modifiedLaserScans_.clear();
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::No) == QMessageBox::Yes)
{
linksAdded_.clear();
linksRefined_.clear();
linksRemoved_.clear();
generatedLocalMaps_.clear();
generatedLocalMapsInfo_.clear();
modifiedLaserScans_.clear();
updateLoopClosuresSlider();
this->updateGraphView();
}
}