From c210bfc0e0205067c4f4274afc7975486e35252a Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Fri, 25 Jan 2019 21:30:43 +0100 Subject: Filter: update counts if dives added / removed Update the filter counts if dives were added removed by the undo commands. The undo commands call into the filter model at the right time so that hidden_by_filter is already set. The filter model keeps track of the counts and emits a signal, which is caught by the widget. Signed-off-by: Berthold Stoeger --- qt-models/filtermodels.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'qt-models/filtermodels.h') diff --git a/qt-models/filtermodels.h b/qt-models/filtermodels.h index 1925bc422..faaae8c2f 100644 --- a/qt-models/filtermodels.h +++ b/qt-models/filtermodels.h @@ -57,9 +57,12 @@ slots: void filterChanged(const QModelIndex &from, const QModelIndex &to, const QVector &roles); void resetModel(DiveTripModelBase::Layout layout); void filterDataChanged(const FilterData &data); + void divesAdded(struct dive_trip *, bool, const QVector &dives); + void divesDeleted(struct dive_trip *, bool, const QVector &dives); signals: void filterFinished(); + void countsChanged(); private: MultiFilterSortModel(QObject *parent = 0); -- cgit v1.2.3-70-g09d2