diff options
Diffstat (limited to 'widgets/table/e-table-click-to-add.c')
-rw-r--r-- | widgets/table/e-table-click-to-add.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/widgets/table/e-table-click-to-add.c b/widgets/table/e-table-click-to-add.c index ed22b5117c..d111df1cd9 100644 --- a/widgets/table/e-table-click-to-add.c +++ b/widgets/table/e-table-click-to-add.c @@ -319,15 +319,27 @@ etcta_event (GnomeCanvasItem *item, GdkEvent *e) case GDK_3270_Enter: if (etcta->row) { ETableModel *one; - e_table_selection_model_clear(etcta->selection); e_table_one_commit(E_TABLE_ONE(etcta->one)); etcta_drop_one (etcta); + gtk_object_destroy(GTK_OBJECT(etcta->row)); + etcta->row = NULL; one = e_table_one_new(etcta->model); etcta_add_one (etcta, one); gtk_object_unref(GTK_OBJECT(one)); + e_table_selection_model_clear(etcta->selection); + + etcta->row = gnome_canvas_item_new(GNOME_CANVAS_GROUP(item), + e_table_item_get_type(), + "ETableHeader", etcta->eth, + "ETableModel", etcta->one, + "minimum_width", etcta->width, + "drawgrid", TRUE, + "table_selection_model", etcta->selection, + NULL); + e_table_item_set_cursor(E_TABLE_ITEM(etcta->row), 0, 0); } break; |