From 5da2e667d0973ec1996aab40810bb2abc4c6bc3a Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Mon, 21 Jul 2014 18:23:02 -0300 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/profile/profilewidget2.cpp | 5 +---- 1 file changed, 1 insertion(+), 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)); -- cgit v1.2.3-70-g09d2