summaryrefslogtreecommitdiffstats
path: root/map-widget
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2017-11-25 23:04:33 +0200
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2017-11-27 22:59:22 +0100
commitd9cfcae88bc7188ba94f62ef2e146e9b19406534 (patch)
treebde7706cc1d79c290aa78a12fe97e7a303c594bb /map-widget
parente18df8493697e8fb7821a42cbc21be67c86d9bd4 (diff)
downloadsubsurface-d9cfcae88bc7188ba94f62ef2e146e9b19406534.tar.gz
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 <neolit123@gmail.com>
Diffstat (limited to 'map-widget')
-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 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()