Deco mode for plannining is not deco mode for showing

We had (in the wrong place, imo) a new feature that
should differentiate the different deco_modes, you could
plan your dive in buelhman and see it in vpm-b, for instance
but both of them accessed the same pref.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2016-11-01 17:00:06 +01:00 committed by Dirk Hohndel
parent c110b4a238
commit 37e3e7e69a
6 changed files with 34 additions and 9 deletions

View file

@ -558,7 +558,7 @@ void ProfileWidget2::plotDive(struct dive *d, bool force)
// this copies the dive and makes copies of all the relevant additional data
copy_dive(d, &displayed_dive);
#ifndef SUBSURFACE_MOBILE
if (prefs.deco_mode == VPMB)
if ((currentState == PLAN && prefs.deco_mode == VPMB) || prefs.display_deco_mode == VPMB)
decoModelParameters->setText(QString("VPM-B +%1").arg(prefs.vpmb_conservatism));
else
decoModelParameters->setText(QString("GF %1/%2").arg(prefs.gflow).arg(prefs.gfhigh));
@ -570,7 +570,7 @@ void ProfileWidget2::plotDive(struct dive *d, bool force)
plannerModel->deleteTemporaryPlan();
return;
}
if (prefs.deco_mode == VPMB)
if ((currentState == PLAN && prefs.deco_mode == VPMB) || prefs.display_deco_mode == VPMB)
decoModelParameters->setText(QString("VPM-B +%1").arg(diveplan.vpmb_conservatism));
else
decoModelParameters->setText(QString("GF %1/%2").arg(diveplan.gflow).arg(diveplan.gfhigh));