summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-02-23 12:44:09 +0100
committerGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-04-07 00:13:34 +0200
commit30d289e4a8a0caadcf30f06872ce69f44cf0bc0d (patch)
tree79a37c61c945995875f63d6e1e49e8e99d76814c /desktop-widgets/mainwindow.cpp
parentaa7b0cadb2f737e65d490f4ad026f5df09a394f0 (diff)
downloadsubsurface-30d289e4a8a0caadcf30f06872ce69f44cf0bc0d.tar.gz
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>
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r--desktop-widgets/mainwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index 8474eee71..78877d1a5 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -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()