summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-09 10:55:56 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-09 10:55:56 -0700
commit95cb4e85ee4ccf1fe6672e82eacd423c6720c201 (patch)
treeb848d8c99a96c978fcec1072c12f2c2354ff8820 /qt-ui
parenta26719c5419754b24a16b7c8163d236eae765a6d (diff)
downloadsubsurface-95cb4e85ee4ccf1fe6672e82eacd423c6720c201.tar.gz
Dive edit: do a better job noticing when the coordinates were changed
Previously the code could get confused by edits (including trivial things like deleting the coordinates). It seems much more reliable to simply compare the coordinates of the edited dive with the ones in the current dive before the edits. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/maintab.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 442136d7f..c0fdeca6e 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -663,7 +663,8 @@ void MainTab::acceptChanges()
}
}
}
- if (ui.coordinates->isModified()) {
+ if (editedDive.latitude.udeg != current_dive->latitude.udeg ||
+ editedDive.longitude.udeg != current_dive->longitude.udeg) {
EDIT_SELECTED_DIVES(gpsHasChanged(mydive, cd, ui.coordinates->text(), 0));
}
if (tagsChanged(&editedDive, cd))