mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-20 06:45:27 +00:00
Select the correct dive in EditAddedDive mode
If we added two dives, and then tried to edit the first added one, the current 'added dive' set on main_tab would be the second one, so when we got to the accept() part of the call, it would reselect the last added_dive that we had. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
09172ddfa4
commit
d9801b67b4
1 changed files with 1 additions and 0 deletions
|
@ -800,6 +800,7 @@ void MainTab::acceptChanges()
|
||||||
// preserve any changes to the profile
|
// preserve any changes to the profile
|
||||||
free(current_dive->dc.sample);
|
free(current_dive->dc.sample);
|
||||||
copy_samples(&displayed_dive.dc, ¤t_dive->dc);
|
copy_samples(&displayed_dive.dc, ¤t_dive->dc);
|
||||||
|
addedId = displayed_dive.id;
|
||||||
}
|
}
|
||||||
struct dive *cd = current_dive;
|
struct dive *cd = current_dive;
|
||||||
// now check if something has changed and if yes, edit the selected dives that
|
// now check if something has changed and if yes, edit the selected dives that
|
||||||
|
|
Loading…
Add table
Reference in a new issue