aboutsummaryrefslogtreecommitdiffstats
path: root/qt-models
diff options
context:
space:
mode:
authorGravatar Tim Segers <tsegers@pm.me>2021-10-07 00:11:20 +0200
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2021-10-11 20:20:20 +0300
commitf3a02d70495bf502ca4fe157dc046c096483fa04 (patch)
tree7dd9b5b03799a9dfd055e2f1e24f002efdabb6a5 /qt-models
parent18c0fa37d1769a7cd1c666b0afd7a9e90f11a517 (diff)
downloadsubsurface-f3a02d70495bf502ca4fe157dc046c096483fa04.tar.gz
Ignore invalid dives in subsurface-mobile dive summary
Match subsurface-desktop's invalid dive behavior Signed-off-by: Tim Segers <tsegers@pm.me>
Diffstat (limited to 'qt-models')
-rw-r--r--qt-models/divesummarymodel.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/qt-models/divesummarymodel.cpp b/qt-models/divesummarymodel.cpp
index 6ae5313e4..b679da1f0 100644
--- a/qt-models/divesummarymodel.cpp
+++ b/qt-models/divesummarymodel.cpp
@@ -121,6 +121,10 @@ static void calculateDive(struct dive *dive, Stats &stats)
return;
}
+ if (dive->invalid) {
+ return;
+ }
+
// one more real dive
stats.dives++;