From d9cfcae88bc7188ba94f62ef2e146e9b19406534 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 25 Nov 2017 23:04:33 +0200 Subject: map-widget: move the map with the edited dive site Once the user starts editing the coordinates by hand (from the "Dive site management" UI) make sure to update the map to center on those user entered coordinates. Signed-off-by: Lubomir I. Ivanov --- map-widget/qmlmapwidgethelper.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'map-widget') diff --git a/map-widget/qmlmapwidgethelper.cpp b/map-widget/qmlmapwidgethelper.cpp index 16f57c317..e900debf1 100644 --- a/map-widget/qmlmapwidgethelper.cpp +++ b/map-widget/qmlmapwidgethelper.cpp @@ -226,6 +226,7 @@ void MapWidgetHelper::updateCurrentDiveSiteCoordinatesToMap() const qreal longitude = displayed_dive_site.longitude.udeg * 0.000001; QGeoCoordinate coord(latitude, longitude); m_mapLocationModel->updateMapLocationCoordinates(displayed_dive_site.uuid, coord); + QMetaObject::invokeMethod(m_map, "centerOnCoordinate", Q_ARG(QVariant, QVariant::fromValue(coord))); } bool MapWidgetHelper::editMode() -- cgit v1.2.3-70-g09d2