diff options
Diffstat (limited to 'mobile-widgets/qmlmapwidgethelper.cpp')
-rw-r--r-- | mobile-widgets/qmlmapwidgethelper.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/mobile-widgets/qmlmapwidgethelper.cpp b/mobile-widgets/qmlmapwidgethelper.cpp index 801e46620..e0781e7c7 100644 --- a/mobile-widgets/qmlmapwidgethelper.cpp +++ b/mobile-widgets/qmlmapwidgethelper.cpp @@ -17,11 +17,8 @@ void MapWidgetHelper::centerOnDiveSite(struct dive_site *ds) {
if (!dive_site_has_gps_location(ds))
return;
-
- qreal longitude = ds->longitude.udeg / 1000000.0;
- qreal latitude = ds->latitude.udeg / 1000000.0;
- QVariant coord = QVariant::fromValue(QGeoCoordinate(latitude, longitude));
- QMetaObject::invokeMethod(m_map, "centerOnCoordinate", Q_ARG(QVariant, coord));
+ MapLocation *location = m_mapLocationModel->getMapLocationForUuid(ds->uuid);
+ QMetaObject::invokeMethod(m_map, "centerOnMapLocation", Q_ARG(QVariant, QVariant::fromValue(location)));
}
void MapWidgetHelper::reloadMapLocations()
|