diff options
author | Robert C. Helling <helling@atdotde.de> | 2014-05-25 18:01:16 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-05-26 08:12:32 -0700 |
commit | 04b6b6aaf9cc194a698c2302abc2032f730aecb4 (patch) | |
tree | e6360fb211f21ec4efc857d0269ed43ecbc6c470 /qt-ui/models.cpp | |
parent | c86d055db77cdeef6049449ac79fe404c40d28cc (diff) | |
download | subsurface-04b6b6aaf9cc194a698c2302abc2032f730aecb4.tar.gz |
Use get_o2() and get_he() instead of accessing permilles directly
This gets rid of problems with air.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r-- | qt-ui/models.cpp | 4 |
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; } |