summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-10-18 12:12:43 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-19 06:20:07 -0400
commit0416e54049da87d834c5102c63c4a9f377c55586 (patch)
tree4cf40de6ef6b526f46aa196a17b652051959de61
parent5a65bb75dab52253db0950254a332a4cd528f41c (diff)
downloadsubsurface-0416e54049da87d834c5102c63c4a9f377c55586.tar.gz
Dive site: select dive site when entering edit mode
Commit 0aef04352a3210a6024f860758af466ea774dd5e made it impossible to move new dive sites on the map. When entering dive-site-edit mode, the filter would be instructed to show only dives of the corresponding dive site [which didn't yet exist] and therefore all dive sites on the map were deselected. Fix this by explicitly centering on the dive site to be edited in MapWidgetHelper::enterEditMode(). Fixes #1809 Reported-by: Jan Mulder <jlmulder@xs4all.nl> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
-rw-r--r--map-widget/qmlmapwidgethelper.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/map-widget/qmlmapwidgethelper.cpp b/map-widget/qmlmapwidgethelper.cpp
index adaaf8848..4d4596ab7 100644
--- a/map-widget/qmlmapwidgethelper.cpp
+++ b/map-widget/qmlmapwidgethelper.cpp
@@ -302,6 +302,7 @@ void MapWidgetHelper::enterEditMode(quint32 uuid)
} else {
coord = exists->coordinate();
}
+ centerOnDiveSiteUUID(uuid);
emit coordinatesChanged(degrees_t { (int)lrint(coord.latitude() * 1000000.0) },
degrees_t { (int)lrint(coord.longitude() * 1000000.0) });
emit editModeChanged();