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>
This commit is contained in:
Tomaz Canabrava 2014-07-21 18:23:02 -03:00 committed by Dirk Hohndel
parent efa05bc0c9
commit 5da2e667d0

View file

@ -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));