diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-09-06 22:03:03 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-10-11 16:22:27 -0700 |
commit | e0fcf99d0ac3ec23e6009a55b6e59c47c668081b (patch) | |
tree | 276310243cf588df6dfef2f4bf515a3b4e5ec53c /qt-models/filtermodels.h | |
parent | 7150d1c6f61631079e7620901fd1939bbc54e621 (diff) | |
download | subsurface-e0fcf99d0ac3ec23e6009a55b6e59c47c668081b.tar.gz |
Filter: reload only when checkstate changed
Currently, the filter is recalculated if a filter-entry is changed.
This also happens if the counts of a filter-entry changes. This
is to be avoided, as it causes unnecessary churn.
Therefore, send the proper role with the dataChanged() signal
and add a new slot, which invalidates only if a field with the
Qt::CheckStateRole is changed.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/filtermodels.h')
-rw-r--r-- | qt-models/filtermodels.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/qt-models/filtermodels.h b/qt-models/filtermodels.h index 3f5ca5f01..2fd5ef2b2 100644 --- a/qt-models/filtermodels.h +++ b/qt-models/filtermodels.h @@ -131,6 +131,7 @@ slots: void clearFilter(); void startFilterDiveSite(uint32_t uuid); void stopFilterDiveSite(); + void filterChanged(const QModelIndex &from, const QModelIndex &to, const QVector<int> &roles); signals: void filterFinished(); |