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>
This commit is contained in:
Berthold Stoeger 2018-09-06 22:03:03 +02:00 committed by Dirk Hohndel
parent 7150d1c6f6
commit e0fcf99d0a
2 changed files with 11 additions and 2 deletions

View file

@ -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();