Desktop: Fix planner for CCR dives with first segment on OC.

Fix a bug that results in dive plans outside of the configured risk
profile being produced when planning a CCR dive with the first segment
set to open circuit.
`d->dc.divemode` is already set in `setRebreatherMode`, which is
sufficient, and congruent with the setting of other dive parameters,
like `diveplan.gflow`.

Signed-off-by: Michael Keller <github@ike.ch>
This commit is contained in:
Michael Keller 2023-02-26 17:32:14 +13:00 committed by Robert C. Helling
parent cb5bc68c59
commit 9aed18451a

View file

@ -383,8 +383,6 @@ bool DivePlannerPointsModel::setData(const QModelIndex &index, const QVariant &v
p.divemode = (enum divemode_t) value.toInt();
p.setpoint = p.divemode == CCR ? prefs.defaultsetpoint : 0;
}
if (index.row() == 0)
d->dc.divemode = (enum divemode_t) value.toInt();
break;
}
editStop(index.row(), p);