diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-05-21 12:18:05 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-05-22 07:30:20 +0900 |
commit | 2a48170fd3103771bae855bde71198febc0ad789 (patch) | |
tree | 4bc94b7d589f50544e97c91399ed4a8d5095b827 /qt-ui/profile/profilewidget2.cpp | |
parent | ef4705070ff67322386041529b7f10eaf09f6cdf (diff) | |
download | subsurface-2a48170fd3103771bae855bde71198febc0ad789.tar.gz |
Code Cleanup: Move the Hide/Show ruler to an internal method
By moving the Hide/Show of the ruler to an internal method, we gain a bit
of codecleanuperism by removing a lot of unnecessary calls to their dest
and source drag-handlers.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/profilewidget2.cpp')
-rw-r--r-- | qt-ui/profile/profilewidget2.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 4a599d711..306ee2cb9 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -364,8 +364,6 @@ void ProfileWidget2::plotDives(QList<dive *> dives) s.beginGroup("TecDetails"); const bool rulerVisible = s.value("rulergraph", false).toBool() && !printMode; rulerItem->setVisible(rulerVisible); - rulerItem->sourceNode()->setVisible(rulerVisible); - rulerItem->destNode()->setVisible(rulerVisible); // 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 @@ -507,13 +505,9 @@ void ProfileWidget2::settingsChanged() if (currentState == PROFILE) { rulerItem->setVisible(prefs.rulergraph); - rulerItem->destNode()->setVisible(prefs.rulergraph); - rulerItem->sourceNode()->setVisible(prefs.rulergraph); needReplot = true; } else { rulerItem->setVisible(false); - rulerItem->destNode()->setVisible(false); - rulerItem->sourceNode()->setVisible(false); } if (needReplot) replot(); @@ -617,8 +611,6 @@ void ProfileWidget2::setEmptyState() diveCeiling->setVisible(false); reportedCeiling->setVisible(false); rulerItem->setVisible(false); - rulerItem->destNode()->setVisible(false); - rulerItem->sourceNode()->setVisible(false); pn2GasItem->setVisible(false); po2GasItem->setVisible(false); pheGasItem->setVisible(false); @@ -691,8 +683,6 @@ void ProfileWidget2::setProfileState() s.beginGroup("TecDetails"); bool rulerVisible = s.value("rulergraph", false).toBool(); rulerItem->setVisible(rulerVisible); - rulerItem->destNode()->setVisible(rulerVisible); - rulerItem->sourceNode()->setVisible(rulerVisible); } extern struct ev_select *ev_namelist; |