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>
This commit is contained in:
Lubomir I. Ivanov 2017-11-25 23:04:33 +02:00
parent e18df84936
commit d9cfcae88b

View file

@ -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()