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