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
|
@ -541,7 +541,7 @@ void PlannerWidgets::planDive()
|
|||
{
|
||||
DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::PLAN);
|
||||
|
||||
MainWindow::instance()->graphics->setPlanState();
|
||||
MainWindow::instance()->graphics->setPlanState(&displayed_dive, 0);
|
||||
dc_number = 0;
|
||||
|
||||
// create a simple starting dive, using the first gas from the just copied cylinders
|
||||
|
@ -569,7 +569,7 @@ void PlannerWidgets::replanDive()
|
|||
DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::PLAN);
|
||||
DivePlannerPointsModel::instance()->loadFromDive(&displayed_dive);
|
||||
|
||||
MainWindow::instance()->graphics->setPlanState();
|
||||
MainWindow::instance()->graphics->setPlanState(&displayed_dive, 0);
|
||||
|
||||
plannerWidget.setReplanButton(true);
|
||||
plannerWidget.setupStartTime(timestampToDateTime(displayed_dive.when));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue