summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/profilewidget2.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-07-21 18:23:02 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-23 07:47:27 -0700
commit5da2e667d0973ec1996aab40810bb2abc4c6bc3a (patch)
tree5b20d8885ad41e61be0a47acc2ba10f4b0dd1b35 /qt-ui/profile/profilewidget2.cpp
parentefa05bc0c91a9392e8c19c2959210da61dae795c (diff)
downloadsubsurface-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.cpp5
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));