planner: access divemode (a.k.a. rebreathermode) from model

The mode was accessed via the global `displayed_dive`. In an effort
to remove globals, access it via the DivePlannerPointsModel instead.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2022-11-06 17:10:37 +01:00 committed by bstoeger
parent c5d6e0f44f
commit d65f2f422c
3 changed files with 12 additions and 6 deletions

View file

@ -545,6 +545,11 @@ void DivePlannerPointsModel::setRebreatherMode(int mode)
emitDataChanged();
}
divemode_t DivePlannerPointsModel::getRebreatherMode() const
{
return d->dc.divemode;
}
void DivePlannerPointsModel::setVpmbConservatism(int level)
{
if (diveplan.vpmb_conservatism != level) {