mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
When editing multiple dives, only copy the cylinder type
Previously we would overwrite the gasmix as well as start and end pressure even when editing multiple dives, which clearly is wrong. Fixes #364 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
27a0f91cff
commit
4b98efb39c
1 changed files with 5 additions and 1 deletions
|
@ -601,7 +601,11 @@ void MainTab::acceptChanges()
|
|||
mark_divelist_changed(TRUE);
|
||||
Q_FOREACH (dive *d, notesBackup.keys()) {
|
||||
for (int i = 0; i < MAX_CYLINDERS; i++) {
|
||||
d->cylinder[i] = multiEditEquipmentPlaceholder.cylinder[i];
|
||||
if (notesBackup.keys().count() > 1)
|
||||
// only copy the cylinder type, none of the other values
|
||||
d->cylinder[i].type = multiEditEquipmentPlaceholder.cylinder[i].type;
|
||||
else
|
||||
d->cylinder[i] = multiEditEquipmentPlaceholder.cylinder[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue