diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-11-24 11:17:06 +0100 |
---|---|---|
committer | bstoeger <32835590+bstoeger@users.noreply.github.com> | 2019-12-04 13:00:23 +0100 |
commit | d0b3a06e036cf5523cf03c22ec698742bd01048a (patch) | |
tree | cb5b8785291e8965505f10ba843dc58df0976bcd /qt-models/filtermodels.cpp | |
parent | 7d5c15f49a4f410a22716394673da79c0daad94b (diff) | |
download | subsurface-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.cpp | 2 |
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); } |