diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-01-18 19:14:43 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-01-19 13:59:24 -0800 |
commit | b3010df14cd241d26898063b155d4f80d538d304 (patch) | |
tree | 18379eedc331f2bd0f315736fed9a126f3a03062 /qt-models | |
parent | 37a521eb5d6de7b8bbbb3f85417ce303db6a3622 (diff) | |
download | subsurface-b3010df14cd241d26898063b155d4f80d538d304.tar.gz |
Filter: reinstate dive-site filter functionality
Commit 201f0c8f89d6d7df96fd220ea2c0d0977c9b7f20 removed the dive-site
filtering. This is needed for dive-site editing: The list should only
show dives at the corresponding dive-site.
As opposed to the original code, only compare for the actual dive-site,
not for the name of the dive-site. The reason for comparing dive-site
names is unknown.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models')
-rw-r--r-- | qt-models/filtermodels.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/qt-models/filtermodels.cpp b/qt-models/filtermodels.cpp index 596bcd98f..6e983c835 100644 --- a/qt-models/filtermodels.cpp +++ b/qt-models/filtermodels.cpp @@ -100,6 +100,10 @@ void MultiFilterSortModel::resetModel(DiveTripModelBase::Layout layout) bool MultiFilterSortModel::showDive(const struct dive *d) const { + // If curr_dive_site is set, we are in a special dive-site editing mode. + if (curr_dive_site) + return d->dive_site == curr_dive_site; + if (!filterData.validFilter) return true; |