diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-02-27 15:31:56 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-02-27 10:48:47 -0800 |
commit | c356fac3b686468dba98b4650e045849274c8a4d (patch) | |
tree | 4026b9fd8d14a61d3a2cc6f9c1c3797c97a9ae1b /qt-ui/profile | |
parent | 35e102b1760a8aa4c589fedeada3914fa54a4d64 (diff) | |
download | subsurface-c356fac3b686468dba98b4650e045849274c8a4d.tar.gz |
New profile: Toggle on / off the ruler via settings.
This patch toggles on / off the ruler via QSettings.
When the user clicks on the toolbar, this sets the settings to true /
false, in a way that if the user turns Subsurface on/ off, we still get
the last choosed option.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile')
-rw-r--r-- | qt-ui/profile/profilewidget2.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index c2de05d3c..ca176a3d4 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -433,6 +433,11 @@ void ProfileWidget2::settingsChanged() dataModel->clear(); plotDives(QList<dive*>() << getDiveById(diveId)); } + + bool rulerVisible = s.value("rulergraph", false).toBool(); + rulerItem->setVisible(rulerVisible); + rulerItem->destNode()->setVisible(rulerVisible ); + rulerItem->sourceNode()->setVisible(rulerVisible ); } void ProfileWidget2::resizeEvent(QResizeEvent* event) @@ -591,7 +596,7 @@ void ProfileWidget2::setProfileState() } } - bool rulerVisible = s.value("rulervisible", false).toBool(); + bool rulerVisible = s.value("rulergraph", false).toBool(); rulerItem->setVisible(rulerVisible); rulerItem->destNode()->setVisible(rulerVisible ); rulerItem->sourceNode()->setVisible(rulerVisible ); |