aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/tab-widgets/TabDiveEquipment.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/tab-widgets/TabDiveEquipment.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/tab-widgets/TabDiveEquipment.cpp')
-rw-r--r--desktop-widgets/tab-widgets/TabDiveEquipment.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/desktop-widgets/tab-widgets/TabDiveEquipment.cpp b/desktop-widgets/tab-widgets/TabDiveEquipment.cpp
index 33a8e5a3c..d34b44c74 100644
--- a/desktop-widgets/tab-widgets/TabDiveEquipment.cpp
+++ b/desktop-widgets/tab-widgets/TabDiveEquipment.cpp
@@ -129,7 +129,7 @@ void TabDiveEquipment::toggleTriggeredColumn()
void TabDiveEquipment::updateData()
{
- cylindersModel->updateDive();
+ cylindersModel->updateDive(current_dive);
weightModel->updateDive(current_dive);
suitModel.updateModel();
@@ -262,7 +262,7 @@ void TabDiveEquipment::acceptChanges()
void TabDiveEquipment::rejectChanges()
{
cylindersModel->model()->changed = false;
- cylindersModel->updateDive();
+ cylindersModel->updateDive(current_dive);
weightModel->updateDive(current_dive);
}