summaryrefslogtreecommitdiffstats
path: root/qt-models
diff options
context:
space:
mode:
Diffstat (limited to 'qt-models')
-rw-r--r--qt-models/maplocationmodel.cpp5
-rw-r--r--qt-models/maplocationmodel.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/qt-models/maplocationmodel.cpp b/qt-models/maplocationmodel.cpp
index ea7d4f098..10d983575 100644
--- a/qt-models/maplocationmodel.cpp
+++ b/qt-models/maplocationmodel.cpp
@@ -229,6 +229,11 @@ void MapLocationModel::setSelected(struct dive_site *ds)
m_selectedDs.append(ds);
}
+void MapLocationModel::setSelected(const QVector<dive_site *> &divesites)
+{
+ m_selectedDs = divesites;
+}
+
bool MapLocationModel::isSelected(const QVariant &dsVariant) const
{
dive_site *ds = dsVariant.value<dive_site *>();
diff --git a/qt-models/maplocationmodel.h b/qt-models/maplocationmodel.h
index 25ae159bd..3335822e2 100644
--- a/qt-models/maplocationmodel.h
+++ b/qt-models/maplocationmodel.h
@@ -68,6 +68,7 @@ public:
// If map is not null, it will be used to place new dive sites without GPS location at the center of the map
void reload(QObject *map);
void selectionChanged();
+ void setSelected(const QVector<dive_site *> &divesites);
MapLocation *getMapLocation(const struct dive_site *ds);
const QVector<dive_site *> &selectedDs() const;
Q_INVOKABLE void setSelected(struct dive_site *ds);