mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
CylinderModel: make dive dynamic
The CylinderModel always accessed the global "displayed_dive" and in some special cases also "current_dive". To implement cylinder undo, the model should work on an arbitrary dive. Therefore, in analogy to the weight model, make the dive dynamic. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
aa7b0cadb2
commit
30d289e4a8
5 changed files with 87 additions and 65 deletions
|
@ -918,7 +918,7 @@ void MainWindow::on_actionReplanDive_triggered()
|
|||
divePlannerWidget->setSalinity(current_dive->salinity);
|
||||
DivePlannerPointsModel::instance()->loadFromDive(current_dive);
|
||||
reset_cylinders(&displayed_dive, true);
|
||||
DivePlannerPointsModel::instance()->cylindersModel()->updateDive();
|
||||
DivePlannerPointsModel::instance()->cylindersModel()->updateDive(&displayed_dive);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionDivePlanner_triggered()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue