summaryrefslogtreecommitdiffstats
path: root/qt-models/maplocationmodel.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-08-30 12:38:25 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-09-06 11:48:47 -0700
commit28cb75b73d3d0fa4cd8dcf3aa5884e93cb13a5d2 (patch)
tree7ddc15816df96e7eb16f8ac6460ff6d298a6023b /qt-models/maplocationmodel.h
parentf818ac3352b5a66d6fcc452ddc5ebb84a18bb29a (diff)
downloadsubsurface-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 'qt-models/maplocationmodel.h')
-rw-r--r--qt-models/maplocationmodel.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/qt-models/maplocationmodel.h b/qt-models/maplocationmodel.h
index b33d2d65d..3fb6f1da8 100644
--- a/qt-models/maplocationmodel.h
+++ b/qt-models/maplocationmodel.h
@@ -65,7 +65,7 @@ public:
void reload(QObject *map);
MapLocation *getMapLocation(const struct dive_site *ds);
const QVector<dive_site *> &selectedDs() const;
- Q_INVOKABLE void setSelected(struct dive_site *ds, bool fromClick = true);
+ Q_INVOKABLE void setSelected(struct dive_site *ds);
// The dive site is passed as a QVariant, because a null-QVariant is not automatically
// transformed into a null pointer and warning messages are spewed onto the console.
Q_INVOKABLE bool isSelected(const QVariant &ds) const;
@@ -83,7 +83,6 @@ private:
signals:
void countChanged(int c);
- void selectedLocationChanged(MapLocation *);
};
#endif