summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-19 17:37:31 +1200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-19 17:39:31 +1200
commitf448bfd574bb9aa4593b43392131174dc489a4b0 (patch)
treed8610aba6b152832d6a2b894584fbb77f546db2c
parent803d390044fe17597c914119a1e0b5411d8d92ff (diff)
downloadsubsurface-f448bfd574bb9aa4593b43392131174dc489a4b0.tar.gz
Hide the old flag when editing a location on the map
This ONLY hides the old flag if the current dive is the only dive on that location (which seems to make sense). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/globe.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp
index 2403758c4..1e4639d5c 100644
--- a/qt-ui/globe.cpp
+++ b/qt-ui/globe.cpp
@@ -194,6 +194,10 @@ void GlobeGPS::repopulateLabels()
// edited, so let's hand roll this loop
while (++idx < dive_table.nr) {
dive = (idx == -1 ? &displayed_dive : get_dive(idx));
+ if (dive == current_dive)
+ // don't show that flag, it's either already shown as displayed_dive
+ // or it's the one that we are moving right now...
+ continue;
if (dive_has_gps_location(dive)) {
GeoDataPlacemark *place = new GeoDataPlacemark(dive->location);
place->setCoordinate(dive->longitude.udeg / 1000000.0, dive->latitude.udeg / 1000000.0, 0, GeoDataCoordinates::Degree);