Turn off dive location edit hint when cancelling dive edit

Simply clear the edited dive (regardless of whether it's set) and hide the
message if visible. The previous code was a little too convoluted...

Fixes #305

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-11-29 13:11:17 -08:00
parent 31f64e9b48
commit d668f5dc8e
2 changed files with 6 additions and 5 deletions

View file

@ -185,11 +185,11 @@ void GlobeGPS::repopulateLabels()
void GlobeGPS::reload()
{
if (editingDiveCoords) {
editingDiveCoords = 0;
if (messageWidget->isVisible())
messageWidget->animatedHide();
}
editingDiveCoords = 0;
if (messageWidget->isVisible())
messageWidget->animatedHide();
repopulateLabels();
}

View file

@ -713,6 +713,7 @@ void MainTab::rejectChanges()
notesBackup.clear();
resetPallete();
editMode = NONE;
mainWindow()->globe()->reload();
if (lastMode == ADD || lastMode == MANUALLY_ADDED_DIVE) {
// more clean up
updateDiveInfo(selected_dive);