mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-23 09:26:27 -06:00
On file open, only destroy a previous session if really exists
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23349 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
7835e8cb3e
commit
df299589d4
@ -701,11 +701,14 @@ RESTART:
|
|||||||
|
|
||||||
/* -------------- BEGIN CORE SESSION CODE ------------- */
|
/* -------------- BEGIN CORE SESSION CODE ------------- */
|
||||||
/* -- this code is almost identical in FileOpen and FileSaveAs -- */
|
/* -- this code is almost identical in FileOpen and FileSaveAs -- */
|
||||||
current_session = gnc_get_current_session();
|
if (gnc_current_session_exist())
|
||||||
qof_session_call_close_hooks(current_session);
|
{
|
||||||
gnc_hook_run(HOOK_BOOK_CLOSED, current_session);
|
current_session = gnc_get_current_session();
|
||||||
gnc_close_gui_component_by_session (current_session);
|
qof_session_call_close_hooks(current_session);
|
||||||
gnc_clear_current_session();
|
gnc_hook_run(HOOK_BOOK_CLOSED, current_session);
|
||||||
|
gnc_close_gui_component_by_session (current_session);
|
||||||
|
gnc_clear_current_session();
|
||||||
|
}
|
||||||
|
|
||||||
/* load the accounts from the users datafile */
|
/* load the accounts from the users datafile */
|
||||||
/* but first, check to make sure we've got a session going. */
|
/* but first, check to make sure we've got a session going. */
|
||||||
|
Loading…
Reference in New Issue
Block a user