suspend events around the Commit(). Fixes #347089 when combined with r14495.

BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14887 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Derek Atkins 2006-09-23 22:31:45 +00:00
parent 09932872e4
commit b72c587350
3 changed files with 16 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2006-09-23 Derek Atkins <derek@ihtfp.com>
* src/ledger-core/split-register*.c:
suspend events around the Commit(). Fixes #347089 when combined
with r14495.
2006-09-19 Christian Stimming <stimming@tuhh.de>
* configure.in: Remove mt940 module completely from the build and

View File

@ -674,10 +674,15 @@ gnc_split_register_auto_completion (SplitRegister *reg,
if (auto_trans == NULL)
return FALSE;
gnc_suspend_gui_refresh ();
/* now perform the completion */
if ((pending_trans != NULL) && (pending_trans != trans)) {
if (gnc_split_register_begin_edit_or_warn(info, trans))
{
gnc_resume_gui_refresh ();
return TRUE;
}
if (xaccTransIsOpen (pending_trans))
xaccTransCommitEdit (pending_trans);
@ -685,7 +690,6 @@ gnc_split_register_auto_completion (SplitRegister *reg,
}
g_assert(xaccTransIsOpen(trans));
pending_trans = trans;
gnc_suspend_gui_refresh ();
gnc_copy_trans_onto_trans (auto_trans, trans, FALSE, FALSE);
blank_split = NULL;

View File

@ -1366,6 +1366,8 @@ gnc_split_register_save (SplitRegister *reg, gboolean do_commit)
if (gnc_split_register_handle_exchange (reg, FALSE))
return TRUE;
gnc_suspend_gui_refresh ();
/* determine whether we should commit the pending transaction */
if (pending_trans != trans)
{
@ -1384,12 +1386,14 @@ gnc_split_register_save (SplitRegister *reg, gboolean do_commit)
} else {
PINFO("beginning edit of trans %p", trans);
if (gnc_split_register_begin_edit_or_warn(info, trans))
{
gnc_resume_gui_refresh ();
return FALSE;
}
}
pending_trans = trans;
}
g_assert(xaccTransIsOpen(trans));
gnc_suspend_gui_refresh ();
/* If we are committing the blank split, add it to the account now */
if (trans == blank_trans)