comparison console/libgnt/gnttree.c @ 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 16cd6fd20e6f
children d059cfbb62ae
comparison
equal deleted inserted replaced
15555:883bf81c8d73 15561:feee34cfff5f
1193 { 1193 {
1194 if (tree->top != tree->root) 1194 if (tree->top != tree->root)
1195 tree->top = get_prev(row); 1195 tree->top = get_prev(row);
1196 else 1196 else
1197 tree->top = get_next(row); 1197 tree->top = get_next(row);
1198 if (tree->current == row) 1198 }
1199 tree->current = tree->top; 1199 if (tree->current == row)
1200 }
1201 else if (tree->current == row)
1202 { 1200 {
1203 if (tree->current != tree->root) 1201 if (tree->current != tree->root)
1204 tree->current = get_prev(row); 1202 tree->current = get_prev(row);
1205 else 1203 else
1206 tree->current = get_next(row); 1204 tree->current = get_next(row);
1207 } 1205 tree_selection_changed(tree, row, tree->current);
1208 else if (tree->bottom == row) 1206 }
1207 if (tree->bottom == row)
1209 { 1208 {
1210 tree->bottom = get_prev(row); 1209 tree->bottom = get_prev(row);
1211 } 1210 }
1212 1211
1213 /* Fix the links */ 1212 /* Fix the links */