Toggle showing average depth

Add additional check box in "preferences->graph" section that allows
users to hide average depth on dive profile.
By default this option is checked to show average depth.

Fixes #475

Signed-off-by: Lakshman Anumolu <acrlakshman@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Lakshman 2014-03-27 13:38:07 -05:00 committed by Dirk Hohndel
parent df7d7d4981
commit 7696fbf9cd
5 changed files with 21 additions and 1 deletions

View file

@ -429,6 +429,10 @@ void ProfileWidget2::plotDives(QList<dive *> dives)
cylinderPressureAxis->setMaximum(pInfo.maxpressure);
rulerItem->setPlotInfo(pInfo);
if (prefs.show_average_depth)
meanDepth->setVisible(true);
else
meanDepth->setVisible(false);
meanDepth->setMeanDepth(pInfo.meandepth);
meanDepth->setLine(0, 0, timeAxis->posAtValue(d->duration.seconds), 0);
meanDepth->animateMoveTo(3, profileYAxis->posAtValue(pInfo.meandepth));