From 2789bb05b133a7cf54081d58d4f5c51c8977e951 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Thu, 28 Jan 2021 14:24:38 +0100 Subject: profile: display arbitrary dive So far the profile operated on the global displayed_dive. Instead, take the dive to be displayed as a parameter to the plotDive() functions. This is necessary if we want to have multiple concurrent profile objects. Think for example for printing or for mobile where multiple dive objects are active at the same time. Signed-off-by: Berthold Stoeger --- desktop-widgets/tab-widgets/maintab.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'desktop-widgets/tab-widgets') diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp index 0170cdb40..78784de46 100644 --- a/desktop-widgets/tab-widgets/maintab.cpp +++ b/desktop-widgets/tab-widgets/maintab.cpp @@ -541,11 +541,6 @@ void MainTab::rejectChanges() // no harm done to call cancelPlan even if we were not PLAN mode... DivePlannerPointsModel::instance()->cancelPlan(); - // now make sure that the correct dive is displayed - if (current_dive) - copy_dive(current_dive, &displayed_dive); - else - clear_dive(&displayed_dive); updateDiveInfo(); // show the profile and dive info -- cgit v1.2.3-70-g09d2