aboutsummaryrefslogtreecommitdiffstats
path: root/qt-models/filtermodels.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-11-24 11:17:06 +0100
committerGravatar bstoeger <32835590+bstoeger@users.noreply.github.com>2019-12-04 13:00:23 +0100
commitd0b3a06e036cf5523cf03c22ec698742bd01048a (patch)
treecb5b8785291e8965505f10ba843dc58df0976bcd /qt-models/filtermodels.cpp
parent7d5c15f49a4f410a22716394673da79c0daad94b (diff)
downloadsubsurface-d0b3a06e036cf5523cf03c22ec698742bd01048a.tar.gz
Filter: use changed-signals to update filter
The dive-trip models now send changed-events if the shown-status changed. Thus, there is no reason to fully reset the filter on filter changes. Simply tell the filter that it has to react to changes of SHOWN_ROLE. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/filtermodels.cpp')
-rw-r--r--qt-models/filtermodels.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-models/filtermodels.cpp b/qt-models/filtermodels.cpp
index 9c1e9d3b5..779920a73 100644
--- a/qt-models/filtermodels.cpp
+++ b/qt-models/filtermodels.cpp
@@ -15,8 +15,8 @@ MultiFilterSortModel *MultiFilterSortModel::instance()
MultiFilterSortModel::MultiFilterSortModel(QObject *parent) : QSortFilterProxyModel(parent)
{
- connect(&diveListNotifier, &DiveListNotifier::filterReset, this, &MultiFilterSortModel::invalidateFilter);
setFilterKeyColumn(-1); // filter all columns
+ setFilterRole(DiveTripModelBase::SHOWN_ROLE); // Let the proxy-model known that is has to react to change events involving SHOWN_ROLE
setFilterCaseSensitivity(Qt::CaseInsensitive);
}