r23692 - gnucash/trunk/src/register/ledger-core - Bug 721290 - SX Editor: Pressing "Enter" too soon hides transaction

John Ralls jralls at code.gnucash.org
Sun Jan 12 21:12:46 EST 2014


Author: jralls
Date: 2014-01-12 21:12:45 -0500 (Sun, 12 Jan 2014)
New Revision: 23692
Trac: http://svn.gnucash.org/trac/changeset/23692

Modified:
   gnucash/trunk/src/register/ledger-core/split-register-load.c
Log:
Bug 721290 - SX Editor: Pressing "Enter" too soon hides transaction

The problem was that r23585 was a bit too broad in what it excluded, so
narrow it down to require exactly one split and that that split's
account is NULL.

Note that this will still cause the split to disappear from the SX
editor if one creates a transaction with no splits or with one that has
no account: A split will be created in the appropriate Orphan account.
It will be visible there and in the General Ledger so that it can be
easily deleted.

Modified: gnucash/trunk/src/register/ledger-core/split-register-load.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/split-register-load.c	2014-01-13 02:12:35 UTC (rev 23691)
+++ gnucash/trunk/src/register/ledger-core/split-register-load.c	2014-01-13 02:12:45 UTC (rev 23692)
@@ -530,7 +530,8 @@
 	 * pending_trans, then it's another register's blank split and
 	 * we don't want to see it.
 	 */
-	else if (xaccTransCountSplits (trans) < 2)
+	else if (xaccTransCountSplits (trans) == 1 &&
+		 xaccSplitGetAccount (split) == NULL)
 	    continue;
 
 
@@ -690,10 +691,9 @@
             if (find_split == gnc_split_register_get_current_split (reg))
                 gnc_table_restore_current_cursor (table, cursor_buffer);
         }
-
-        gnc_cursor_buffer_destroy (cursor_buffer);
-        cursor_buffer = NULL;
     }
+    gnc_cursor_buffer_destroy (cursor_buffer);
+    cursor_buffer = NULL;
 
     update_info (info, reg);
 



More information about the gnucash-changes mailing list