summaryrefslogtreecommitdiffstats
path: root/qt-models/filtermodels.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-03-22 20:55:05 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-04-12 18:19:07 +0300
commit9afea37e15db29f59048d1bc2553838943ca1b62 (patch)
tree784c76adcc6da786c32254b2aa400631d68753b3 /qt-models/filtermodels.h
parente7063b6b08dff5c35436a5fb16fcf3f81717ca52 (diff)
downloadsubsurface-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.h1
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