mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
7d5c15f49a
commit
d0b3a06e03
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue