From 76a5a38f5e8aad339061f534df8130b426079a03 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 2 Nov 2019 18:47:56 +0100 Subject: 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 --- desktop-widgets/tab-widgets/TabDiveEquipment.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'desktop-widgets') 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) -- cgit v1.2.3-70-g09d2