diff --git a/ChangeLog b/ChangeLog index 54d8f96a28..f4d3db7608 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-02-02 David Hampton + + * src/gnome-utils/gnc-file.c: Re-enable events before processing + the book-opened hook. Solves some strange problems in the account + tree which were caused by the Orphan account being created during + the callbacks, but no event being sent to the account tree model. + 2006-02-02 Derek Atkins * src/backend/file/io-gncxml-v2.c: diff --git a/src/gnome-utils/gnc-file.c b/src/gnome-utils/gnc-file.c index 2a11207ab5..76c76b4795 100644 --- a/src/gnome-utils/gnc-file.c +++ b/src/gnome-utils/gnc-file.c @@ -519,10 +519,11 @@ gnc_file_new (void) gnc_hook_run(HOOK_NEW_BOOK, NULL); - gnc_book_opened (); - gnc_engine_resume_events (); gnc_gui_refresh_all (); + + /* Call this after re-enabling events. */ + gnc_book_opened (); } gboolean @@ -773,6 +774,7 @@ gnc_post_file_open (const char * filename) gnc_engine_resume_events (); gnc_gui_refresh_all (); + /* Call this after re-enabling events. */ gnc_book_opened (); return FALSE; @@ -782,8 +784,6 @@ gnc_post_file_open (const char * filename) /* close up the old file session (if any) */ qof_session_set_current_session(new_session); - gnc_book_opened (); - /* --------------- END CORE SESSION CODE -------------- */ /* clean up old stuff, and then we're outta here. */ @@ -794,6 +794,9 @@ gnc_post_file_open (const char * filename) gnc_engine_resume_events (); gnc_gui_refresh_all (); + /* Call this after re-enabling events. */ + gnc_book_opened (); + return TRUE; }