From f448bfd574bb9aa4593b43392131174dc489a4b0 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 19 Jan 2015 17:37:31 +1200 Subject: 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 --- qt-ui/globe.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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); -- cgit v1.2.3-70-g09d2