diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 306ee2cb9..d222ad940 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -360,10 +359,7 @@ void ProfileWidget2::plotDives(QList dives) // reset some item visibility on printMode changes toolTipItem->setVisible(!printMode); - QSettings s; - s.beginGroup("TecDetails"); - const bool rulerVisible = s.value("rulergraph", false).toBool() && !printMode; - rulerItem->setVisible(rulerVisible); + rulerItem->setVisible(prefs.rulergraph && !printMode); // No need to do this again if we are already showing the same dive // computer of the same dive, so we check the unique id of the dive @@ -679,10 +675,7 @@ void ProfileWidget2::setProfileState() tissue->setVisible(true); } } - QSettings s; - s.beginGroup("TecDetails"); - bool rulerVisible = s.value("rulergraph", false).toBool(); - rulerItem->setVisible(rulerVisible); + rulerItem->setVisible(prefs.rulergraph); } extern struct ev_select *ev_namelist;