mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Disable info widget when canceling 'add dive' for a first dive
One more corner case that we cover correctly. Reported-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
446ab45858
commit
72f0516f6d
2 changed files with 9 additions and 6 deletions
|
@ -883,11 +883,11 @@ void delete_single_dive(int idx)
|
|||
if (!dive)
|
||||
return; /* this should never happen */
|
||||
remove_dive_from_trip(dive);
|
||||
if (dive->selected)
|
||||
deselect_dive(idx);
|
||||
for (i = idx; i < dive_table.nr - 1; i++)
|
||||
dive_table.dives[i] = dive_table.dives[i+1];
|
||||
dive_table.dives[--dive_table.nr] = NULL;
|
||||
if (dive->selected)
|
||||
amount_selected--;
|
||||
/* free all allocations */
|
||||
free(dive->dc.sample);
|
||||
if (dive->location)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue