mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
Don't overwrite the new cylinders when adding a dive
We carefully assembled the correct data in the cylinders - don't replace that data when manually editing a dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
dee1645de0
commit
c18464b44f
1 changed files with 2 additions and 2 deletions
|
@ -474,8 +474,7 @@ void MainTab::acceptChanges()
|
|||
|
||||
if (notesBackup[curr].tags != ui.tagWidget->text())
|
||||
saveTags();
|
||||
|
||||
if (cylindersModel->changed) {
|
||||
if (editMode != ADD && cylindersModel->changed) {
|
||||
mark_divelist_changed(TRUE);
|
||||
Q_FOREACH (dive *d, notesBackup.keys()) {
|
||||
for (int i = 0; i < MAX_CYLINDERS; i++) {
|
||||
|
@ -494,6 +493,7 @@ void MainTab::acceptChanges()
|
|||
}
|
||||
|
||||
}
|
||||
save_dive(stdout, current_dive);
|
||||
if (editMode == ADD || editMode == MANUALLY_ADDED_DIVE) {
|
||||
// clean up the dive data (get duration, depth information from samples)
|
||||
fixup_dive(current_dive);
|
||||
|
|
Loading…
Reference in a new issue