summaryrefslogtreecommitdiffstats
path: root/qt-ui/diveplanner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/diveplanner.cpp')
-rw-r--r--qt-ui/diveplanner.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 08e67e00a..631d605cf 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -545,7 +545,8 @@ bool DivePlannerPointsModel::setData(const QModelIndex &index, const QVariant &v
divedatapoint &p = divepoints[index.row()];
switch (index.column()) {
case DEPTH:
- p.depth = units_to_depth(value.toInt());
+ if (value.toInt() >= 0)
+ p.depth = units_to_depth(value.toInt());
break;
case RUNTIME:
p.time = value.toInt() * 60;