mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 07:43:23 +00:00
Show a flag when editing a location on the globe
Since we don't modify the dive list, the new flag wouldn't show up until we accepted the change - that's not user friendly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
df46b85ee1
commit
803d390044
1 changed files with 6 additions and 2 deletions
|
@ -187,9 +187,13 @@ void GlobeGPS::repopulateLabels()
|
|||
loadedDives = new GeoDataDocument;
|
||||
QMap<QString, GeoDataPlacemark *> locationMap;
|
||||
|
||||
int idx = 0;
|
||||
int idx = -2;
|
||||
struct dive *dive;
|
||||
for_each_dive (idx, dive) {
|
||||
// normally we use for_each_dive (idx, dive) to loop over all dives,
|
||||
// but we need to include the displayed_dive while things are
|
||||
// edited, so let's hand roll this loop
|
||||
while (++idx < dive_table.nr) {
|
||||
dive = (idx == -1 ? &displayed_dive : get_dive(idx));
|
||||
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);
|
||||
|
|
Loading…
Add table
Reference in a new issue