mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
c5d6e0f44f
commit
d65f2f422c
3 changed files with 12 additions and 6 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue