mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 06:30:26 +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())
|
if (notesBackup[curr].tags != ui.tagWidget->text())
|
||||||
saveTags();
|
saveTags();
|
||||||
|
if (editMode != ADD && cylindersModel->changed) {
|
||||||
if (cylindersModel->changed) {
|
|
||||||
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++) {
|
||||||
|
@ -494,6 +493,7 @@ void MainTab::acceptChanges()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
save_dive(stdout, current_dive);
|
||||||
if (editMode == ADD || editMode == MANUALLY_ADDED_DIVE) {
|
if (editMode == ADD || editMode == MANUALLY_ADDED_DIVE) {
|
||||||
// clean up the dive data (get duration, depth information from samples)
|
// clean up the dive data (get duration, depth information from samples)
|
||||||
fixup_dive(current_dive);
|
fixup_dive(current_dive);
|
||||||
|
|
Loading…
Reference in a new issue