summaryrefslogtreecommitdiffstats
path: root/map-widget/qmlmapwidgethelper.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-10-08 21:16:40 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-08 13:29:51 -0700
commit0aef04352a3210a6024f860758af466ea774dd5e (patch)
tree8758b8080f172bb010f249950c3ebc7e225f8819 /map-widget/qmlmapwidgethelper.h
parent1c8b73b36f528bf8d2765a1c064980b1e2022650 (diff)
downloadsubsurface-0aef04352a3210a6024f860758af466ea774dd5e.tar.gz
Map: zoom on dive sites when flipping through dive site list
The dive site list was connected to centerOnDiveSite(). Apparently, the currently selected dive site should have been shown in the map. Yet, this never worked, because the actual dive site of the selected dive had precedence in centerOnDiveSite(). It seems that centerOnDiveSite() had actually to purposes: 1) center on the passed in dive site 2) center on the dive sites of the selected dives Therefore, split this function in two separate functions for each of these use-cases. This allows us to remove some pre-processor magic (mobile vs. desktop) and to remove a parameter from the MainTab::diveSiteChanged() signal. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'map-widget/qmlmapwidgethelper.h')
-rw-r--r--map-widget/qmlmapwidgethelper.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/map-widget/qmlmapwidgethelper.h b/map-widget/qmlmapwidgethelper.h
index 7b218e9a9..e5c77aa8a 100644
--- a/map-widget/qmlmapwidgethelper.h
+++ b/map-widget/qmlmapwidgethelper.h
@@ -27,6 +27,7 @@ public:
explicit MapWidgetHelper(QObject *parent = NULL);
void centerOnDiveSite(struct dive_site *);
+ void centerOnSelectedDiveSite();
Q_INVOKABLE QGeoCoordinate getCoordinatesForUUID(QVariant dive_site_uuid);
Q_INVOKABLE void centerOnDiveSiteUUID(QVariant dive_site_uuid);
Q_INVOKABLE void reloadMapLocations();