From d4a91a52fa54db951d09f9433b392d50183bf7ab Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Fri, 3 May 2019 12:10:19 +0200 Subject: 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 --- desktop-widgets/mapwidget.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'desktop-widgets/mapwidget.h') 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 #include @@ -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 &, DiveField field); private: static MapWidget *m_instance; -- cgit v1.2.3-70-g09d2