Update gas deco MOD when deco pO2 is changed

This fix is reasonably straightforward when the divedatapoint structure stores
the cylinder rather than gasmix.

Fixes #970

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Rick Walsh 2016-07-06 22:40:30 +10:00 committed by Dirk Hohndel
parent b827107619
commit 1ba61d7ad5
3 changed files with 20 additions and 0 deletions

View file

@ -514,7 +514,10 @@ void PlannerSettingsWidget::setBottomPo2(double po2)
void PlannerSettingsWidget::setDecoPo2(double po2)
{
pressure_t olddecopo2;
olddecopo2.mbar = prefs.decopo2;
prefs.decopo2 = (int) (po2 * 1000.0);
CylindersModel::instance()->updateDecoDepths(olddecopo2);
}
void PlannerSettingsWidget::setBestmixEND(int depth)