diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-03-22 20:55:05 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-04-12 18:19:07 +0300 |
commit | 9afea37e15db29f59048d1bc2553838943ca1b62 (patch) | |
tree | 784c76adcc6da786c32254b2aa400631d68753b3 /qt-models/filtermodels.h | |
parent | e7063b6b08dff5c35436a5fb16fcf3f81717ca52 (diff) | |
download | subsurface-9afea37e15db29f59048d1bc2553838943ca1b62.tar.gz |
Undo: update filter flag when dives change
The filter code is strange: it actually only checks the
dive->hidden_by_filter flag. Thus, before propagating the dive
changed signal, this flag has to be updated. Do this in the
DiveTripModel. Ultimately, this should be refactored.
Moreover, if the filter-flag changed notify the frontend
of a changed trip so that the trip is hidden / unhidden.
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 3b3e14abc..6513788f2 100644 --- a/qt-models/filtermodels.h +++ b/qt-models/filtermodels.h @@ -60,6 +60,7 @@ public: static MultiFilterSortModel *instance(); bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override; bool showDive(const struct dive *d) const; + bool updateDive(struct dive *d); // returns true if visibility status changed int divesDisplayed; bool lessThan(const QModelIndex &, const QModelIndex &) const override; public |