From 825eb019abf1ee7fb477a43f76da573a60fea188 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 4 Aug 2014 07:36:07 -0700 Subject: Planner: show mean depth Almost invisible, mostly looking like an odd bug in the profile code, there was a tiny red line at depth 0 in the planned profile. Turns out that was the missing mean depth. We didn't populate enough data in the dive computer of the dive we generated from the plan (and the length of the depth line was incorrectly determined by the duration of the dive instead of the duration stored in the dive computer). Fixes #570 Signed-off-by: Dirk Hohndel --- qt-ui/profile/profilewidget2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui/profile/profilewidget2.cpp') diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 8f0d1584f..7941ffa31 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -481,7 +481,7 @@ void ProfileWidget2::plotDive(struct dive *d, bool force) rulerItem->setPlotInfo(pInfo); meanDepth->setVisible(prefs.show_average_depth); meanDepth->setMeanDepth(pInfo.meandepth); - meanDepth->setLine(0, 0, timeAxis->posAtValue(displayed_dive.duration.seconds), 0); + meanDepth->setLine(0, 0, timeAxis->posAtValue(currentdc->duration.seconds), 0); Animations::moveTo(meanDepth,3, profileYAxis->posAtValue(pInfo.meandepth)); dataModel->emitDataChanged(); -- cgit v1.2.3-70-g09d2