diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-09-24 12:32:18 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-09-24 12:32:18 -0700 |
commit | 72f0516f6dc36fb3813563a76dac86d946aba5b8 (patch) | |
tree | 11ee661194f29ba9f81e77caef030464f7da3e6c /divelist.c | |
parent | 446ab45858b509e56029e5c1557a12ca3680a674 (diff) | |
download | subsurface-72f0516f6dc36fb3813563a76dac86d946aba5b8.tar.gz |
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>
Diffstat (limited to 'divelist.c')
-rw-r--r-- | divelist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/divelist.c b/divelist.c index 777c53ba2..d5ee9b71a 100644 --- a/divelist.c +++ b/divelist.c @@ -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) |