From 342880e798defc90709e5e7cf97f89be71eab188 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Thu, 2 Aug 2001 03:27:59 +0000 Subject: Set the et->cursor_loc *before* committing the click-to-add to avoid 2001-08-01 Federico Mena Quintero * e-table.c (group_cursor_change): Set the et->cursor_loc *before* committing the click-to-add to avoid reentrancy issues if the table model changes while the click-to-add is being committed. svn path=/trunk/; revision=11564 --- widgets/table/e-table.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'widgets/table') diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index a11d940bfe..83296059c8 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -430,13 +430,17 @@ click_to_add_cursor_change (ETableClickToAdd *etcta, int row, int col, ETable *e static void group_cursor_change (ETableGroup *etg, int row, ETable *et) { - if (et->cursor_loc == E_TABLE_CURSOR_LOC_ETCTA && et->click_to_add) { - e_table_click_to_add_commit(E_TABLE_CLICK_TO_ADD(et->click_to_add)); - } + ETableCursorLoc old_cursor_loc; + + old_cursor_loc = et->cursor_loc; + et->cursor_loc = E_TABLE_CURSOR_LOC_TABLE; gtk_signal_emit (GTK_OBJECT (et), et_signals [CURSOR_CHANGE], row); + + if (old_cursor_loc == E_TABLE_CURSOR_LOC_ETCTA && et->click_to_add) + e_table_click_to_add_commit(E_TABLE_CLICK_TO_ADD(et->click_to_add)); } static void -- cgit v1.2.3