diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-07-21 18:23:02 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-07-23 07:47:27 -0700 |
commit | 5da2e667d0973ec1996aab40810bb2abc4c6bc3a (patch) | |
tree | 5b20d8885ad41e61be0a47acc2ba10f4b0dd1b35 /qt-ui/profile/profilewidget2.cpp | |
parent | efa05bc0c91a9392e8c19c2959210da61dae795c (diff) | |
download | subsurface-5da2e667d0973ec1996aab40810bb2abc4c6bc3a.tar.gz |
Set visibility in a saner way
for some reason we did a if(true) setValue(true) else serValue(false)
now we just use the value to set the value. =p
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 | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 67dff1583..7157f5385 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -486,10 +486,7 @@ void ProfileWidget2::plotDive(struct dive *d, bool force) cylinderPressureAxis->setMaximum(pInfo.maxpressure); rulerItem->setPlotInfo(pInfo); - if (prefs.show_average_depth) - meanDepth->setVisible(true); - else - meanDepth->setVisible(false); + meanDepth->setVisible(prefs.show_average_depth); meanDepth->setMeanDepth(pInfo.meandepth); meanDepth->setLine(0, 0, timeAxis->posAtValue(displayed_dive.duration.seconds), 0); Animations::moveTo(meanDepth,3, profileYAxis->posAtValue(pInfo.meandepth)); |