AUDIT: r14887 - gnucash/trunk - suspend events around the Commit(). Fixes #347089 when combined with r14495.

Derek Atkins warlord at cvs.gnucash.org
Sat Sep 23 18:31:47 EDT 2006


Author: warlord
Date: 2006-09-23 18:31:45 -0400 (Sat, 23 Sep 2006)
New Revision: 14887
Trac: http://svn.gnucash.org/trac/changeset/14887

Modified:
   gnucash/trunk/
   gnucash/trunk/ChangeLog
   gnucash/trunk/src/register/ledger-core/split-register-control.c
   gnucash/trunk/src/register/ledger-core/split-register.c
Log:
suspend events around the Commit(). Fixes #347089 when combined with r14495.
BP



Property changes on: gnucash/trunk
___________________________________________________________________
Name: svk:merge
   - d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/trunk:13282
   + d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/trunk:13342

Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2006-09-23 11:10:27 UTC (rev 14886)
+++ gnucash/trunk/ChangeLog	2006-09-23 22:31:45 UTC (rev 14887)
@@ -1,3 +1,9 @@
+2006-09-23  Derek Atkins  <derek at 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 at tuhh.de>
 
 	* configure.in: Remove mt940 module completely from the build and

Modified: gnucash/trunk/src/register/ledger-core/split-register-control.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/split-register-control.c	2006-09-23 11:10:27 UTC (rev 14886)
+++ gnucash/trunk/src/register/ledger-core/split-register-control.c	2006-09-23 22:31:45 UTC (rev 14887)
@@ -674,10 +674,15 @@
         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 @@
         }
         g_assert(xaccTransIsOpen(trans));
         pending_trans = trans;
-        gnc_suspend_gui_refresh ();
 
         gnc_copy_trans_onto_trans (auto_trans, trans, FALSE, FALSE);
         blank_split = NULL;

Modified: gnucash/trunk/src/register/ledger-core/split-register.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/split-register.c	2006-09-23 11:10:27 UTC (rev 14886)
+++ gnucash/trunk/src/register/ledger-core/split-register.c	2006-09-23 22:31:45 UTC (rev 14887)
@@ -1366,6 +1366,8 @@
    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 @@
        } 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)



More information about the gnucash-changes mailing list