summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/diveplanner.cpp
diff options
context:
space:
mode:
authorGravatar Rick Walsh <rickmwalsh@gmail.com>2016-07-06 22:40:30 +1000
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-07-09 12:08:01 -0700
commit1ba61d7ad5025cf3bafc86705cf4c174aef8c264 (patch)
treecf7ee60af949fa971479d4b180199f5910993830 /desktop-widgets/diveplanner.cpp
parentb8271076193c76a0695302715753efff60fdb4dc (diff)
downloadsubsurface-1ba61d7ad5025cf3bafc86705cf4c174aef8c264.tar.gz
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>
Diffstat (limited to 'desktop-widgets/diveplanner.cpp')
-rw-r--r--desktop-widgets/diveplanner.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp
index 4e462cca0..7ac88f9bc 100644
--- a/desktop-widgets/diveplanner.cpp
+++ b/desktop-widgets/diveplanner.cpp
@@ -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)