mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-17 20:26:17 +00:00
Core: don't copy dive-id on merge dive
The installment of the divelist-undo system has made it unnecessary to adopt the uniq-id of the merged-into dive. On the contrary, we want to avoid two dives with the same dive-id in the divelist at all costs, since get_divenr() still uses the id and thus may fetch the wrong dive. Therefore, don't copy the dive-id on merge. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
0dfc59f38c
commit
fd196f143a
1 changed files with 0 additions and 1 deletions
|
@ -1503,7 +1503,6 @@ static bool try_to_merge_into(struct dive *dive_to_add, int idx, struct dive_tab
|
|||
if (!replace_in && old_dive->divetrip)
|
||||
replace_in = &old_dive->divetrip->dives;
|
||||
|
||||
merged->id = old_dive->id;
|
||||
merged->selected = old_dive->selected;
|
||||
merged->divetrip = old_dive->divetrip;
|
||||
old_dive->divetrip = NULL;
|
||||
|
|
Loading…
Add table
Reference in a new issue