From 0416e54049da87d834c5102c63c4a9f377c55586 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Thu, 18 Oct 2018 12:12:43 +0200 Subject: 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 Signed-off-by: Berthold Stoeger --- map-widget/qmlmapwidgethelper.cpp | 1 + 1 file changed, 1 insertion(+) 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(); -- cgit v1.2.3-70-g09d2