From a19f9c22ce9709fae6aa88ddb27a0cf42a820c46 Mon Sep 17 00:00:00 2001 From: Stefan Fuchs Date: Sun, 16 Apr 2017 11:24:41 +0200 Subject: Last added dive planner point for correct lenght not always added Don't add the last stop with addstop for correcting the lenght of the dive if planner generated points can be removed when replanning. Otherwise this will not be deleted when replanning a dive. Signed-off-by: Stefan Fuchs --- qt-models/diveplannermodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-models') diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp index bd90e4dfb..35f696c01 100644 --- a/qt-models/diveplannermodel.cpp +++ b/qt-models/diveplannermodel.cpp @@ -119,7 +119,7 @@ void DivePlannerPointsModel::loadFromDive(dive *d) } } // make sure we get the last point right so the duration is correct - addStop(0, d->dc.duration.seconds,cylinderid, 0, true); + if (!hasMarkedSamples) addStop(0, d->dc.duration.seconds,cylinderid, 0, true); recalc = oldRec; emitDataChanged(); } -- cgit v1.2.3-70-g09d2