mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Keep edited profile after editing a manually added dive
This is yet another unintended side effect of the UI restructure changes. I stared at this code for so long - I can't believe I kept missing this. Fixes #668 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e32bdad8e9
commit
13d922aef7
1 changed files with 5 additions and 0 deletions
|
@ -664,6 +664,11 @@ void MainTab::acceptChanges()
|
|||
currentTrip = NULL;
|
||||
ui.dateEdit->setEnabled(true);
|
||||
} else {
|
||||
if (editMode == MANUALLY_ADDED_DIVE) {
|
||||
// preserve any changes to the profile
|
||||
free(current_dive->dc.sample);
|
||||
copy_samples(&displayed_dive.dc, ¤t_dive->dc);
|
||||
}
|
||||
struct dive *cd = current_dive;
|
||||
//Reset coordinates field, in case it contains garbage.
|
||||
updateGpsCoordinates(&displayed_dive);
|
||||
|
|
Loading…
Add table
Reference in a new issue