From 7696fbf9cdb6292f487815bffdbc879a178cc73f Mon Sep 17 00:00:00 2001 From: Lakshman Date: Thu, 27 Mar 2014 13:38:07 -0500 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/profile/profilewidget2.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'qt-ui/profile') diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index ef52e2884..a58244689 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -429,6 +429,10 @@ void ProfileWidget2::plotDives(QList 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)); -- cgit v1.2.3-70-g09d2