aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2017-11-25 16:15:57 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-11-25 08:24:36 -0800
commitdd2466f51899aae406dc8c13904787710f30ec1c (patch)
tree45a06a318509b0e1c7957ba09b4ca6ce0030de83 /desktop-widgets/mainwindow.cpp
parent4da6a0a73261a34a71e8f95261769128c3c1df0b (diff)
downloadsubsurface-dd2466f51899aae406dc8c13904787710f30ec1c.tar.gz
Update filters on refreshDisplay and remember old selecttions
Update the filters if the list of dives is updated by calling MultiFilterSortModel::instance()->myInvalidate(); This had the side effect of clearing all selections. Thus, in the repopulate() methods of the FilterModels, check those entries that were checked previously. Since all the filter models use the same code, introduce a base class FilterModelBase. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r--desktop-widgets/mainwindow.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index f685a2b74..b0817b9f1 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -445,7 +445,7 @@ MainWindow *MainWindow::instance()
return m_Instance;
}
-// this gets called after we download dives from a divecomputer
+// This gets called after one or more dives were added, edited or downloaded for a dive computer
void MainWindow::refreshDisplay(bool doRecreateDiveList)
{
information()->reload();
@@ -469,6 +469,7 @@ void MainWindow::recreateDiveList()
BuddyFilterModel::instance()->repopulate();
LocationFilterModel::instance()->repopulate();
SuitsFilterModel::instance()->repopulate();
+ MultiFilterSortModel::instance()->myInvalidate();
}
void MainWindow::configureToolbar() {