From 8dfc49dc84fbd3745a92a25c5097a5312dcfe883 Mon Sep 17 00:00:00 2001 From: Derek Atkins Date: Wed, 26 Dec 2007 02:39:29 +0000 Subject: [PATCH] Wait for pending events before displaying the tree view (#463678) BP git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16727 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/gnome-utils/gnc-tree-view-account.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gnome-utils/gnc-tree-view-account.c b/src/gnome-utils/gnc-tree-view-account.c index d539cf5740..06527c368e 100644 --- a/src/gnome-utils/gnc-tree-view-account.c +++ b/src/gnome-utils/gnc-tree-view-account.c @@ -1119,6 +1119,11 @@ gnc_tree_view_account_set_selected_account (GncTreeViewAccount *view, gtk_tree_path_free(parent_path); gtk_tree_selection_select_path (selection, s_path); + + /* give gtk+ a chance to resize the tree view first by handling pending + * configure events */ + while (gtk_events_pending ()) + gtk_main_iteration (); gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW(view), s_path, NULL, FALSE, 0.0, 0.0); debug_path(LEAVE, s_path); gtk_tree_path_free(s_path);