summaryrefslogtreecommitdiffstats
path: root/qt-models/diveplannermodel.cpp
diff options
context:
space:
mode:
authorGravatar Oliver Schwaneberg <oliver.schwaneberg@gmail.com>2018-02-04 23:17:58 +0100
committerGravatar Jan Mulder <jlmulder@xs4all.nl>2018-02-07 09:22:15 +0100
commit218ea948316fe9e1581935becac8f1225d16e955 (patch)
treec6c7af7b0fcddb1827b7ee8eab34d83b2fbb69af /qt-models/diveplannermodel.cpp
parentf762367d539d29a36f1b3f797fe851dda2168347 (diff)
downloadsubsurface-218ea948316fe9e1581935becac8f1225d16e955.tar.gz
Bugfix in plannermodel for very short dive durations
When adding a dive manually, you might clear the "duration" field and fill in your value by hand. Unfortunately, commit #1052 produced a bug that practically limited the dive duration to 6 minutes once the field was cleared. Signed-off-by: Oliver Schwaneberg <oliver.schwaneberg@gmail.com>
Diffstat (limited to 'qt-models/diveplannermodel.cpp')
-rw-r--r--qt-models/diveplannermodel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp
index 43ab20de3..17d21fe64 100644
--- a/qt-models/diveplannermodel.cpp
+++ b/qt-models/diveplannermodel.cpp
@@ -108,7 +108,7 @@ void DivePlannerPointsModel::loadFromDive(dive *d)
int cylinderid = 0;
last_sp.mbar = 0;
for (int i = 0; i < plansamples - 1; i++) {
- if (dc->last_manual_time.seconds && lasttime.seconds >= dc->last_manual_time.seconds)
+ if (dc->last_manual_time.seconds && dc->last_manual_time.seconds > 120 && lasttime.seconds >= dc->last_manual_time.seconds)
break;
while (j * plansamples <= i * dc->samples) {
const sample &s = dc->sample[j];