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>
This commit is contained in:
Dirk Hohndel 2015-01-19 17:37:31 +12:00
parent 803d390044
commit f448bfd574

View file

@ -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);