From efb514d63c2a9e66c366d5ffe13b84932581ec18 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Wed, 5 Jun 2002 13:51:24 +0000 Subject: Made it so that on realize we grab focus if we have the cursor, since 2002-06-05 Christopher James Lahey * e-table-item.c (eti_realize): Made it so that on realize we grab focus if we have the cursor, since otherwise, we'll change our selection on focus in. svn path=/trunk/; revision=17115 --- widgets/table/e-table-item.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c index 512586f4d4..86f55aeab2 100644 --- a/widgets/table/e-table-item.c +++ b/widgets/table/e-table-item.c @@ -1665,6 +1665,17 @@ eti_realize (GnomeCanvasItem *item) free_height_cache(eti); + if (item->canvas->focused_item == NULL) { + int row; + row = e_selection_model_cursor_row (E_SELECTION_MODEL (eti->selection)); + row = model_to_view_row(eti, row); + if (row != -1) { + e_canvas_item_grab_focus (item, FALSE); + eti_show_cursor (eti, 0); + eti_check_cursor_bounds (eti); + } + } + eti->needs_compute_height = 1; eti->needs_compute_width = 1; e_canvas_item_request_reflow (GNOME_CANVAS_ITEM (eti)); -- cgit v1.2.3