From c3614424f9117c053c783fba5f6499743ec125f9 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 24 Jan 2015 07:05:32 +1200 Subject: Correcly look at all relevant dive computer structures When calculating maxima for a dive, we need to take data from all existing dive computer structures plus potentially also a fake dive computer structure that is just passed in in order to create a meaningful profile. Commit 86c961614bfa ("Actually walk all dive computers, don't just claim to do so") missed that second case and no longer took the fake_dc into account, breaking the display of dives that don't have samples. Reported-by: Miika Turkia Signed-off-by: Dirk Hohndel --- qt-ui/profile/profilewidget2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui') diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 141c7e978..ea2a42d49 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -535,7 +535,7 @@ void ProfileWidget2::plotDive(struct dive *d, bool force) * so I'll *not* calculate everything if something is not being * shown. */ - plotInfo = calculate_max_limits_new(&displayed_dive); + plotInfo = calculate_max_limits_new(&displayed_dive, currentdc); create_plot_info_new(&displayed_dive, currentdc, &plotInfo, !shouldCalculateMaxDepth); if (shouldCalculateMaxTime) maxtime = get_maxtime(&plotInfo); -- cgit v1.2.3-70-g09d2