aboutsummaryrefslogtreecommitdiffstats
path: root/qt-models
diff options
context:
space:
mode:
Diffstat (limited to 'qt-models')
-rw-r--r--qt-models/cylindermodel.cpp6
-rw-r--r--qt-models/cylindermodel.h1
2 files changed, 6 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
diff --git a/qt-models/cylindermodel.h b/qt-models/cylindermodel.h
index b8ed7e0eb..e7477193e 100644
--- a/qt-models/cylindermodel.h
+++ b/qt-models/cylindermodel.h
@@ -49,6 +49,7 @@ public:
void moveAtFirst(int cylid);
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
bool updateBestMixes();
+ void emitDataChanged();
bool cylinderUsed(int i) const;
signals: