summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-12-12 23:17:58 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-20 15:20:44 -0700
commit95b60d1b18adb5ef1ed4edb2797bc67cca511d4a (patch)
tree77fbba71ef34a59412f8fd14ee1ed47b3222ea28 /core
parent4e47cdfa2c611e0e02f46b84d76d29f1fab74e20 (diff)
downloadsubsurface-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.cpp3
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;