mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +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,6 +601,10 @@ void MainTab::acceptChanges()
|
||||||
mark_divelist_changed(TRUE);
|
mark_divelist_changed(TRUE);
|
||||||
Q_FOREACH (dive *d, notesBackup.keys()) {
|
Q_FOREACH (dive *d, notesBackup.keys()) {
|
||||||
for (int i = 0; i < MAX_CYLINDERS; i++) {
|
for (int i = 0; i < MAX_CYLINDERS; 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];
|
d->cylinder[i] = multiEditEquipmentPlaceholder.cylinder[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue