diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-02-23 12:44:09 +0100 |
---|---|---|
committer | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-04-07 00:13:34 +0200 |
commit | 30d289e4a8a0caadcf30f06872ce69f44cf0bc0d (patch) | |
tree | 79a37c61c945995875f63d6e1e49e8e99d76814c /desktop-widgets/tab-widgets/TabDiveEquipment.cpp | |
parent | aa7b0cadb2f737e65d490f4ad026f5df09a394f0 (diff) | |
download | subsurface-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.cpp | 4 |
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); } |