diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-11-02 18:47:56 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-12-05 10:14:25 -0800 |
commit | 76a5a38f5e8aad339061f534df8130b426079a03 (patch) | |
tree | c86f07458d4af78431facdb45ccf6c0368e8baa9 /desktop-widgets/tab-widgets/TabDiveEquipment.cpp | |
parent | 936362c1020a87a4c34252913f2cd5d49716c432 (diff) | |
download | subsurface-76a5a38f5e8aad339061f534df8130b426079a03.tar.gz |
Cleanup: remove displayed_dive from WeightModel
The WeightModel always acted on the displayed dive. To support undo
of weightsystem changes, operate on an arbitrary dive. This is
in line with other models, where the updateDive() function resets
the model to represent a certain dive.
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 f7e2d2667..110472e56 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(); - weightModel->updateDive(); + weightModel->updateDive(current_dive); suitModel.updateModel(); ui.cylinders->view()->hideColumn(CylindersModel::DEPTH); @@ -272,7 +272,7 @@ void TabDiveEquipment::rejectChanges() cylindersModel->changed = false; weightModel->changed = false; cylindersModel->updateDive(); - weightModel->updateDive(); + weightModel->updateDive(current_dive); } void TabDiveEquipment::divesEdited(int i) |