From 236a904db32148be27f3d6f14b7ab3a19b745c27 Mon Sep 17 00:00:00 2001
From: Li Yuan
Date: Thu, 4 Nov 2004 02:10:17 +0000
Subject: if canvas has a focused item but the etable does not have a cursor
row,
2004-11-04 Li Yuan
* gal/e-table/e-table.c: (table_canvas_focus_event_cb):
if canvas has a focused item but the etable does not have a cursor row,
just focus the first item.
svn path=/trunk/; revision=27828
---
widgets/table/e-table.c | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'widgets/table/e-table.c')
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index 9534230be1..ab836fb372 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -1124,6 +1124,10 @@ table_canvas_focus_event_cb (GtkWidget *widget, GdkEventFocus *event, gpointer d
gnome_canvas_item_grab_focus (etable->click_to_add);
} else if (!canvas->focused_item && etable->group) {
focus_first_etable_item (etable->group);
+ } else if (canvas->focused_item) {
+ ESelectionModel *selection = (ESelectionModel *)etable->selection;
+ if (e_selection_model_cursor_row (selection) == -1)
+ focus_first_etable_item (etable->group);
}
return TRUE;
--
cgit v1.2.3