aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/models.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r--qt-ui/models.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index c04b973e5..68603e735 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -253,6 +253,10 @@ bool CylindersModel::setData(const QModelIndex &index, const QVariant &value, in
case O2:
if (CHANGED()) {
cyl->gasmix.o2 = string_to_fraction(vString.toUtf8().data());
+ if (!cyl->gasmix.o2.permille) {
+ cyl->gasmix.o2.permille = 210;
+ cyl->gasmix.he.permille = 0;
+ }
cyl->depth.mm = 1600 * 1000 / cyl->gasmix.o2.permille * 10 - 10000;
changed = true;
}