diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-11-17 13:04:31 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-11-19 12:02:09 -0800 |
commit | d166e34fed53786000b9afa353e806b918d53714 (patch) | |
tree | 9af1b1857320b0a04d85af3592a61fe8ebf108f2 /divelist.c | |
parent | 804b22dcd9dd5beb316640997fa559929fdb5d2a (diff) | |
download | subsurface-d166e34fed53786000b9afa353e806b918d53714.tar.gz |
Fix silly thinko in recent changes to "Delete dive" code
Commit 38c79d149db0 ("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>
Diffstat (limited to 'divelist.c')
-rw-r--r-- | divelist.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/divelist.c b/divelist.c index 3e48d2fb9..59db7c208 100644 --- a/divelist.c +++ b/divelist.c @@ -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); |