diff options
Diffstat (limited to 'mobile-widgets')
-rw-r--r-- | mobile-widgets/qmlmapwidgethelper.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mobile-widgets/qmlmapwidgethelper.cpp b/mobile-widgets/qmlmapwidgethelper.cpp index e0781e7c7..70d165983 100644 --- a/mobile-widgets/qmlmapwidgethelper.cpp +++ b/mobile-widgets/qmlmapwidgethelper.cpp @@ -15,8 +15,10 @@ MapWidgetHelper::MapWidgetHelper(QObject *parent) : QObject(parent) void MapWidgetHelper::centerOnDiveSite(struct dive_site *ds)
{
- if (!dive_site_has_gps_location(ds))
+ if (!dive_site_has_gps_location(ds)) {
+ QMetaObject::invokeMethod(m_map, "deselectMapLocation");
return;
+ }
MapLocation *location = m_mapLocationModel->getMapLocationForUuid(ds->uuid);
QMetaObject::invokeMethod(m_map, "centerOnMapLocation", Q_ARG(QVariant, QVariant::fromValue(location)));
}
|