aboutsummaryrefslogtreecommitdiffstats
path: root/qt-models/cylindermodel.cpp
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2020-07-11 13:15:21 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-07-11 10:37:49 -0700
commit912e1faaf21afbfac0cec07db036d97b13ed847c (patch)
treebe163ed3780ee79cd2bda0b5a27842cb29516109 /qt-models/cylindermodel.cpp
parent4ec88aa564d7f5b02fda66342b11ba03fc82d7cf (diff)
downloadsubsurface-912e1faaf21afbfac0cec07db036d97b13ed847c.tar.gz
Make MND display depend on O2 narcotic preference
A while ago, we introduced a preference whether O2 should be considered narcotic. We used this when computing best mix or when entering the He content via MND. But we forgot to make the displayed MND depend on this preference. This patch add this. Fixes #2895 Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'qt-models/cylindermodel.cpp')
-rw-r--r--qt-models/cylindermodel.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/qt-models/cylindermodel.cpp b/qt-models/cylindermodel.cpp
index 0055849ff..84e9b063f 100644
--- a/qt-models/cylindermodel.cpp
+++ b/qt-models/cylindermodel.cpp
@@ -663,10 +663,14 @@ bool CylindersModel::updateBestMixes()
/* This slot is called when the bottom pO2 and END preferences are updated, we want to
* emit dataChanged so MOD and MND are refreshed, even if the gas mix hasn't been changed */
if (gasUpdated)
- emit dataChanged(createIndex(0, 0), createIndex(d->cylinders.nr - 1, COLUMNS - 1));
+ emitDataChanged();
return gasUpdated;
}
+void CylindersModel::emitDataChanged() {
+ emit dataChanged(createIndex(0, 0), createIndex(d->cylinders.nr - 1, COLUMNS - 1));
+}
+
void CylindersModel::cylindersReset(const QVector<dive *> &dives)
{
// This model only concerns the currently displayed dive. If this is not among the