diff options
Diffstat (limited to 'qt-models')
-rw-r--r-- | qt-models/maplocationmodel.cpp | 9 | ||||
-rw-r--r-- | qt-models/maplocationmodel.h | 3 |
2 files changed, 4 insertions, 8 deletions
diff --git a/qt-models/maplocationmodel.cpp b/qt-models/maplocationmodel.cpp index da0ec7337..452c49b8d 100644 --- a/qt-models/maplocationmodel.cpp +++ b/qt-models/maplocationmodel.cpp @@ -193,14 +193,11 @@ void MapLocationModel::reload(QObject *map) endResetModel(); } -void MapLocationModel::setSelected(struct dive_site *ds, bool fromClick) +void MapLocationModel::setSelected(struct dive_site *ds) { m_selectedDs.clear(); - if (!ds) - return; - m_selectedDs.append(ds); - if (fromClick) - emit selectedLocationChanged(getMapLocation(ds)); + if (ds) + m_selectedDs.append(ds); } bool MapLocationModel::isSelected(const QVariant &dsVariant) const 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 |