From 488eb1542336088245841d79549e26938e2d3fd9 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Fri, 30 Aug 2019 17:38:54 +0200 Subject: Desktop: show all selected dive sites on click When clicking a dive site on the map, the QML code would set the selected dive site, but then all dives of dive sites in the vicinity were set. But still only the clicked-on dive site was shown. Therefore, don't set the list of selected dive sites in QML, but later in DiveListView::selectDives(), where we know all the dives that were selected. This, again, gives nasty entanglement of diverse widgets and models. Signed-off-by: Berthold Stoeger --- qt-models/maplocationmodel.h | 1 + 1 file changed, 1 insertion(+) (limited to 'qt-models/maplocationmodel.h') 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 &divesites); MapLocation *getMapLocation(const struct dive_site *ds); const QVector &selectedDs() const; Q_INVOKABLE void setSelected(struct dive_site *ds); -- cgit v1.2.3-70-g09d2