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 --- qt-models/divepicturemodel.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'qt-models') diff --git a/qt-models/divepicturemodel.cpp b/qt-models/divepicturemodel.cpp index e73377d32..af2813e78 100644 --- a/qt-models/divepicturemodel.cpp +++ b/qt-models/divepicturemodel.cpp @@ -193,7 +193,6 @@ void DivePictureModel::picturesRemoved(dive *d, QVector filenamesIn) endRemoveRows(); toIdx -= j - i; } - copy_dive(current_dive, &displayed_dive); // TODO: Remove once displayed_dive is moved to the planner } // Assumes that pics is sorted! @@ -306,7 +305,6 @@ void DivePictureModel::pictureOffsetChanged(dive *d, const QString filenameIn, o // Update the offset here and in the backend oldPos->offsetSeconds = offset.seconds; - copy_dive(current_dive, &displayed_dive); // TODO: remove once profile can display arbitrary dives // Henceforth we will work with indices instead of iterators int oldIndex = oldPos - pictures.begin(); -- cgit v1.2.3-70-g09d2