aboutsummaryrefslogtreecommitdiffstats
path: root/qt-models
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-08-31 08:46:11 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-09-06 11:48:47 -0700
commitfc706a0d722c2ae07d298f6e13794216e8d96a90 (patch)
treeba40c02e1306c15fd4d77cd5a7c6ebe69a4eca0c /qt-models
parent4713611ea8132f3c4b11b0a5409d500a5d271dd7 (diff)
downloadsubsurface-fc706a0d722c2ae07d298f6e13794216e8d96a90.tar.gz
Filter: reload map on myInvalidate
Since selection change doesn't to a full map reload, we have to reload the map on filter changes, since the shown dive sites change. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models')
-rw-r--r--qt-models/filtermodels.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/qt-models/filtermodels.cpp b/qt-models/filtermodels.cpp
index 9ef910def..7beb11d49 100644
--- a/qt-models/filtermodels.cpp
+++ b/qt-models/filtermodels.cpp
@@ -12,6 +12,7 @@
#if !defined(SUBSURFACE_MOBILE)
#include "desktop-widgets/divelistview.h"
#include "desktop-widgets/mainwindow.h"
+#include "desktop-widgets/mapwidget.h"
#endif
#include <QDebug>
@@ -264,6 +265,11 @@ void MultiFilterSortModel::myInvalidate()
countsChanged();
}
+#if !defined(SUBSURFACE_MOBILE)
+ // The shown maps may have changed -> reload the map widget.
+ MapWidget::instance()->reload();
+#endif
+
emit filterFinished();
#if !defined(SUBSURFACE_MOBILE)