diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-12-14 09:20:37 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-12-14 09:32:24 -0800 |
commit | 4b98efb39c0bbcfe21c635bbb8e529710bdf70cd (patch) | |
tree | a5a621b8a593ba285f26d886ea5548ecd628947e /qt-ui | |
parent | 27a0f91cff9e81bcb97060f536b8f85d6a46e976 (diff) | |
download | subsurface-4b98efb39c0bbcfe21c635bbb8e529710bdf70cd.tar.gz |
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>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/maintab.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 81187dcf8..82e5d2ee5 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -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]; } } } |