changeset 15561:feee34cfff5f

Patch from Richard 'wabz' Nelson: Make sure selection-changed signal is emitted if selected item is removed.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sun, 04 Feb 2007 23:14:06 +0000
parents 883bf81c8d73
children d720141d70a2 0b5db3387ded
files console/libgnt/gnttree.c
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/console/libgnt/gnttree.c	Sun Feb 04 21:01:34 2007 +0000
+++ b/console/libgnt/gnttree.c	Sun Feb 04 23:14:06 2007 +0000
@@ -1195,17 +1195,16 @@
 				tree->top = get_prev(row);
 			else
 				tree->top = get_next(row);
-			if (tree->current == row)
-				tree->current = tree->top;
 		}
-		else if (tree->current == row)
+		if (tree->current == row)
 		{
 			if (tree->current != tree->root)
 				tree->current = get_prev(row);
 			else
 				tree->current = get_next(row);
+			tree_selection_changed(tree, row, tree->current);
 		}
-		else if (tree->bottom == row)
+		if (tree->bottom == row)
 		{
 			tree->bottom = get_prev(row);
 		}