From 94a8222e180c526cadf6df4f5cf3c040904e6083 Mon Sep 17 00:00:00 2001 From: Li Yuan Date: Tue, 6 Dec 2005 05:18:51 +0000 Subject: Fixes bug #322776. When focus come into e-tree, it is possible that the 2005-12-06 Li Yuan * e-tree.c: (table_canvas_focus_event_cb): Fixes bug #322776. When focus come into e-tree, it is possible that the focused_item is not NULL and there is no focused item in e-tree. So test e_selection_model_cursor_row also. svn path=/trunk/; revision=30724 --- widgets/table/ChangeLog | 8 ++++++++ widgets/table/e-tree.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'widgets/table') diff --git a/widgets/table/ChangeLog b/widgets/table/ChangeLog index 5062808b55..58b7b19302 100644 --- a/widgets/table/ChangeLog +++ b/widgets/table/ChangeLog @@ -1,3 +1,11 @@ +2005-12-06 Li Yuan + + * e-tree.c: (table_canvas_focus_event_cb): + Fixes bug #322776. + When focus come into e-tree, it is possible that the focused_item + is not NULL and there is no focused item in e-tree. So test + e_selection_model_cursor_row also. + 2005-10-14 Kaushal Kumar * table/e-table-group-container.c diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c index 65abb65cce..dc72272dac 100644 --- a/widgets/table/e-tree.c +++ b/widgets/table/e-tree.c @@ -1051,7 +1051,7 @@ table_canvas_focus_event_cb (GtkWidget *widget, GdkEventFocus *event, gpointer d canvas = GNOME_CANVAS (widget); tree = E_TREE (data); - if (!canvas->focused_item) { + if (!canvas->focused_item || (e_selection_model_cursor_row (tree->priv->selection) == -1)) { e_table_item_set_cursor (E_TABLE_ITEM (tree->priv->item), 0, 0); gnome_canvas_item_grab_focus (tree->priv->item); } -- cgit