mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
936362c102
commit
76a5a38f5e
3 changed files with 25 additions and 22 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue