mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
4ec88aa564
commit
912e1faaf2
5 changed files with 12 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue