diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-08-30 12:38:25 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-09-06 11:48:47 -0700 |
commit | 28cb75b73d3d0fa4cd8dcf3aa5884e93cb13a5d2 (patch) | |
tree | 7ddc15816df96e7eb16f8ac6460ff6d298a6023b /map-widget/qmlmapwidgethelper.h | |
parent | f818ac3352b5a66d6fcc452ddc5ebb84a18bb29a (diff) | |
download | subsurface-28cb75b73d3d0fa4cd8dcf3aa5884e93cb13a5d2.tar.gz |
Map: explicitly reload selected map on click
When clicking on a flag
1) The QML would call MapLocationModel::setSelected() with
fromClick = true
2) MapLocationModel::setSelected() would emit a signal
selectedLocationChanged()
3) MapWidgetHelper would catch that signal and do the actual
processing.
Other functions would call MapLocationModel::setSelected() with
fromClick = false, which would not emit the selectedLocationChanged()
signal.
Detangle this a bit by calling the selectedLocationChanged() function
directly from QML and remove the fromClick parameter.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'map-widget/qmlmapwidgethelper.h')
-rw-r--r-- | map-widget/qmlmapwidgethelper.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/map-widget/qmlmapwidgethelper.h b/map-widget/qmlmapwidgethelper.h index 4079b6aa0..3560a51d1 100644 --- a/map-widget/qmlmapwidgethelper.h +++ b/map-widget/qmlmapwidgethelper.h @@ -35,6 +35,7 @@ public: Q_INVOKABLE void calculateSmallCircleRadius(QGeoCoordinate coord); Q_INVOKABLE void updateCurrentDiveSiteCoordinatesFromMap(struct dive_site *ds, QGeoCoordinate coord); Q_INVOKABLE void selectVisibleLocations(); + Q_INVOKABLE void selectedLocationChanged(struct dive_site *ds); QString pluginObject(); private: @@ -45,7 +46,6 @@ private: bool m_editMode; private slots: - void selectedLocationChanged(MapLocation *); void diveSiteChanged(struct dive_site *ds, int field); signals: |