Fix partial pressure graph thresholds

Since we only store things in the preferences if they are different from
the default, the existing code that simply compared with the settings
value didn't work when people used the defaults.

We now compare to the actual preference at runtime which should address
that.

Fixes #731

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-11-01 09:22:07 -07:00
parent f0cee72444
commit 89e7cae854
3 changed files with 9 additions and 9 deletions

View file

@ -272,9 +272,9 @@ void ProfileWidget2::setupItemOnScene()
ITEM->settingsChanged(); \
ITEM->setZValue(99);
CREATE_PP_GAS(pn2GasItem, PN2, PN2, PN2_ALERT, "pn2threshold", "pn2graph");
CREATE_PP_GAS(pheGasItem, PHE, PHE, PHE_ALERT, "phethreshold", "phegraph");
CREATE_PP_GAS(po2GasItem, PO2, PO2, PO2_ALERT, "po2threshold", "po2graph");
CREATE_PP_GAS(pn2GasItem, PN2, PN2, PN2_ALERT, &prefs.pp_graphs.pn2_threshold, "pn2graph");
CREATE_PP_GAS(pheGasItem, PHE, PHE, PHE_ALERT, &prefs.pp_graphs.phe_threshold, "phegraph");
CREATE_PP_GAS(po2GasItem, PO2, PO2, PO2_ALERT, &prefs.pp_graphs.po2_threshold, "po2graph");
#undef CREATE_PP_GAS
temperatureAxis->setTextVisible(false);