mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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 <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
36f0ba9abe
commit
2789bb05b1
9 changed files with 121 additions and 131 deletions
|
@ -193,7 +193,6 @@ void DivePictureModel::picturesRemoved(dive *d, QVector<QString> 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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue