diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-12-12 23:17:58 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-03-20 15:20:44 -0700 |
commit | 95b60d1b18adb5ef1ed4edb2797bc67cca511d4a (patch) | |
tree | 77fbba71ef34a59412f8fd14ee1ed47b3222ea28 /core | |
parent | 4e47cdfa2c611e0e02f46b84d76d29f1fab74e20 (diff) | |
download | subsurface-95b60d1b18adb5ef1ed4edb2797bc67cca511d4a.tar.gz |
Filter: hide invalid dives
Hide invalid dives if prefs.display_invalid_dives is false.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core')
-rw-r--r-- | core/divefilter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/divefilter.cpp b/core/divefilter.cpp index c84b31c2f..ed8e30f5f 100644 --- a/core/divefilter.cpp +++ b/core/divefilter.cpp @@ -287,6 +287,9 @@ DiveFilter::DiveFilter() : diveSiteRefCount(0) bool DiveFilter::showDive(const struct dive *d) const { + if (d->invalid && !prefs.display_invalid_dives) + return false; + if (!filterData.validFilter) return true; |