mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Renaming the prefs struct members to be consistent with the QSettings.
-Renaming prefs members for consistency. -Changing references of QSettings to the prefs structure instead. -Removing unused functions in pref.h were left over from an old version. -Changing the data-type of bool members to short for consistency with other members. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4bd4c01108
commit
8380f09619
8 changed files with 80 additions and 97 deletions
|
@ -353,10 +353,7 @@ QColor DepthAxis::colorForValue(double value)
|
|||
|
||||
static bool isPPGraphEnabled()
|
||||
{
|
||||
QSettings s;
|
||||
|
||||
s.beginGroup("TecDetails");
|
||||
return s.value("phegraph").toBool() || s.value("po2graph").toBool() || s.value("pn2graph").toBool();
|
||||
return prefs.pp_graphs.po2 || prefs.pp_graphs.pn2 || prefs.pp_graphs.phe;
|
||||
}
|
||||
|
||||
DepthAxis::DepthAxis() : showWithPPGraph(false)
|
||||
|
@ -426,11 +423,9 @@ void PartialGasPressureAxis::setModel(DivePlotDataModel *m)
|
|||
|
||||
void PartialGasPressureAxis::preferencesChanged()
|
||||
{
|
||||
QSettings s;
|
||||
s.beginGroup("TecDetails");
|
||||
bool showPhe = s.value("phegraph").toBool();
|
||||
bool showPn2 = s.value("pn2graph").toBool();
|
||||
bool showPo2 = s.value("po2graph").toBool();
|
||||
bool showPhe = prefs.pp_graphs.phe;
|
||||
bool showPn2 = prefs.pp_graphs.pn2;
|
||||
bool showPo2 = prefs.pp_graphs.po2;
|
||||
setVisible(showPhe || showPn2 || showPo2);
|
||||
if (!model->rowCount())
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue