From d668f5dc8e0121d4000c7b2c340d7a0cd86efc49 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 29 Nov 2013 13:11:17 -0800 Subject: [PATCH] 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 --- qt-ui/globe.cpp | 10 +++++----- qt-ui/maintab.cpp | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp index 83b9464b4..8b3f140b7 100644 --- a/qt-ui/globe.cpp +++ b/qt-ui/globe.cpp @@ -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(); } diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 0e1e52289..ca0aba926 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -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);