summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mapwidget.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-05-03 12:10:19 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-05-11 12:06:19 -0700
commitd4a91a52fa54db951d09f9433b392d50183bf7ab (patch)
treee1a40541edcd23d0061ab6d263f65e13387a3959 /desktop-widgets/mapwidget.h
parent48b8129137ed3db1c4b0940301c8bfc9662bcee3 (diff)
downloadsubsurface-d4a91a52fa54db951d09f9433b392d50183bf7ab.tar.gz
Map: reload on selection change directly
When changing the dive selection, we have to reload the map to show the correctly highlighted flags. Do this directly by hooking into the DiveListNotifier::divesChanged signal instead of indirectly via the MainTab. Moreover, on reload center on the highlighted dive sites. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/mapwidget.h')
-rw-r--r--desktop-widgets/mapwidget.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/desktop-widgets/mapwidget.h b/desktop-widgets/mapwidget.h
index 96da308d8..cfa7ce8b6 100644
--- a/desktop-widgets/mapwidget.h
+++ b/desktop-widgets/mapwidget.h
@@ -3,6 +3,7 @@
#define MAPWIDGET_H
#include "core/units.h"
+#include "core/subsurface-qt/DiveListNotifier.h"
#include <QQuickWidget>
#include <QList>
@@ -11,7 +12,6 @@
class QResizeEvent;
class QQuickItem;
class MapWidgetHelper;
-struct dive_site;
class MapWidget : public QQuickWidget {
@@ -35,6 +35,7 @@ public slots:
void coordinatesChanged(struct dive_site *ds, const location_t &);
void doneLoading(QQuickWidget::Status status);
void diveSiteChanged(struct dive_site *ds, int field);
+ void divesChanged(dive_trip *, const QVector<dive *> &, DiveField field);
private:
static MapWidget *m_instance;