summaryrefslogtreecommitdiffstats
path: root/qt-models/cylindermodel.cpp
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2020-09-29 23:59:56 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-09-29 15:46:55 -0700
commitefdc875aa3174ba53a819490e498a59ba0399dc6 (patch)
tree8ae826cccd72201712ed0662472c7582297ee43f /qt-models/cylindermodel.cpp
parenta7ca27d0712d1e73893c541aabcaaf68aac7afc7 (diff)
downloadsubsurface-efdc875aa3174ba53a819490e498a59ba0399dc6.tar.gz
Use correct pO2 when computing MOD in equipment tab
The cylinder model is used both in the planner and the equipment tab. We have three preferences for the pO2 that is used to compute MOD: In the planner, there is one for the bottom part of the dive and another one for deco. Those are set in the planenr UI. There is another value, controlled in the Tec Prefernces. That one should be used in the equipment tab rather than the one from the planner. Fixes #2984 Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'qt-models/cylindermodel.cpp')
-rw-r--r--qt-models/cylindermodel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-models/cylindermodel.cpp b/qt-models/cylindermodel.cpp
index f8612c48d..61bb3b9f5 100644
--- a/qt-models/cylindermodel.cpp
+++ b/qt-models/cylindermodel.cpp
@@ -230,7 +230,7 @@ QVariant CylindersModel::data(const QModelIndex &index, int role) const
return QStringLiteral("*");
} else {
pressure_t modpO2;
- modpO2.mbar = prefs.bottompo2;
+ modpO2.mbar = in_planner() ? prefs.bottompo2 : prefs.modpO2 * 1000;
return get_depth_string(gas_mod(cyl->gasmix, modpO2, d, M_OR_FT(1,1)), true);
}
case MND: