mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Fix silly thinko in recent changes to "Delete dive" code
Commit 38c79d149d
("Simplify and clean up dive trip management")
simplified the code a bit *too* much, and removed the check for
"dive->selected".
As a result, trying to delete a dive resulted in *all* dives being
deleted.
Oops.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
804b22dcd9
commit
d166e34fed
1 changed files with 2 additions and 0 deletions
|
@ -2032,6 +2032,8 @@ static void delete_selected_dives_cb(GtkWidget *menuitem, GtkTreePath *path)
|
|||
dive = get_dive(i);
|
||||
if (!dive)
|
||||
continue;
|
||||
if (!dive->selected)
|
||||
continue;
|
||||
/* now remove the dive from the table and free it. also move the iterator back,
|
||||
* so that we don't skip a dive */
|
||||
delete_single_dive(i);
|
||||
|
|
Loading…
Add table
Reference in a new issue