diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-11-17 19:53:18 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-11-19 21:13:40 -0800 |
commit | 3003c6e1eed330978193d6859eca2f79ee68aa54 (patch) | |
tree | 1baeb54aeca0eda10d273779cf3704095a170d2e /desktop-widgets | |
parent | 9ffafbc326b38bd2d0bb870fa4721b6c94280c28 (diff) | |
download | subsurface-3003c6e1eed330978193d6859eca2f79ee68aa54.tar.gz |
Filter: move recalculation of filter from FilterModel to TripModel
The way this was accessed via Qt's model semantics was horrible.
This gives arguably more readable code, since we don't have to
shoehorn things through QVariants.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/divelistview.cpp | 2 | ||||
-rw-r--r-- | desktop-widgets/mainwindow.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/desktop-widgets/divelistview.cpp b/desktop-widgets/divelistview.cpp index d6a4d507e..860e3bc95 100644 --- a/desktop-widgets/divelistview.cpp +++ b/desktop-widgets/divelistview.cpp @@ -47,7 +47,7 @@ DiveListView::DiveListView(QWidget *parent) : QTreeView(parent), mouseClickSelec resetModel(); // Update selection if all selected dives were hidden by filter - connect(MultiFilterSortModel::instance(), &MultiFilterSortModel::filterFinished, this, &DiveListView::filterFinished); + connect(&diveListNotifier, &DiveListNotifier::filterReset, this, &DiveListView::filterFinished); connect(&diveListNotifier, &DiveListNotifier::tripChanged, this, &DiveListView::tripChanged); diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 41369f8ec..676fbce87 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -423,7 +423,7 @@ void MainWindow::refreshDisplay(bool doRecreateDiveList) void MainWindow::recreateDiveList() { diveList->reload(); - MultiFilterSortModel::instance()->myInvalidate(); + DiveTripModelBase::instance()->recalculateFilter(); } void MainWindow::configureToolbar() |