summaryrefslogtreecommitdiffstats
path: root/qt-models/diveplannermodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-models/diveplannermodel.cpp')
-rw-r--r--qt-models/diveplannermodel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp
index 5a06313f4..38fbbb1b8 100644
--- a/qt-models/diveplannermodel.cpp
+++ b/qt-models/diveplannermodel.cpp
@@ -588,11 +588,12 @@ int DivePlannerPointsModel::lastEnteredPoint()
return -1;
}
+// cylinderid_in == -1 means same gas as before.
int DivePlannerPointsModel::addStop(int milimeters, int seconds, int cylinderid_in, int ccpoint, bool entered)
{
int cylinderid = 0;
bool usePrevious = false;
- if (cylinderid_in)
+ if (cylinderid_in >= 0)
cylinderid = cylinderid_in;
else
usePrevious = true;