summaryrefslogtreecommitdiffstats
path: root/qt-models
diff options
context:
space:
mode:
authorGravatar Rick Walsh <rickmwalsh@gmail.com>2016-07-06 22:40:37 +1000
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-07-09 12:08:48 -0700
commitbb3151795188fc5ef53053ce004dc1d1f2de63a1 (patch)
tree03e4fce2ec15be5af9f405a82b12c404d4af0e75 /qt-models
parentffca5674bf62381e6ebb05715b71ed3d801d6ca7 (diff)
downloadsubsurface-bb3151795188fc5ef53053ce004dc1d1f2de63a1.tar.gz
Planner: update cylinder mixes and MND and MOD when prefs are changed
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-models')
-rw-r--r--qt-models/cylindermodel.cpp2
-rw-r--r--qt-models/cylindermodel.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/qt-models/cylindermodel.cpp b/qt-models/cylindermodel.cpp
index 9d85cb661..4d9fe9beb 100644
--- a/qt-models/cylindermodel.cpp
+++ b/qt-models/cylindermodel.cpp
@@ -506,6 +506,8 @@ bool CylindersModel::updateBestMixes()
gasUpdated = true;
}
}
+ /* 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 */
emit dataChanged(createIndex(0, 0), createIndex(MAX_CYLINDERS - 1, COLUMNS - 1));
return gasUpdated;
}
diff --git a/qt-models/cylindermodel.h b/qt-models/cylindermodel.h
index d4ef8dc41..ce2c87e69 100644
--- a/qt-models/cylindermodel.h
+++ b/qt-models/cylindermodel.h
@@ -38,13 +38,13 @@ public:
void updateDive();
void copyFromDive(struct dive *d);
void updateDecoDepths(pressure_t olddecopo2);
- bool updateBestMixes();
cylinder_t *cylinderAt(const QModelIndex &index);
bool changed;
public
slots:
void remove(const QModelIndex &index);
+ bool updateBestMixes();
private:
int rows;