r22659 - gnucash/trunk/src/register/ledger-core - Call gnc_split_register_current_trans_expanded instead of duplicating it.

Mike Alexander mta at code.gnucash.org
Mon Dec 17 00:35:27 EST 2012


Author: mta
Date: 2012-12-17 00:35:27 -0500 (Mon, 17 Dec 2012)
New Revision: 22659
Trac: http://svn.gnucash.org/trac/changeset/22659

Modified:
   gnucash/trunk/src/register/ledger-core/split-register-control.c
Log:
Call gnc_split_register_current_trans_expanded instead of duplicating it.

Modified: gnucash/trunk/src/register/ledger-core/split-register-control.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/split-register-control.c	2012-12-15 19:15:31 UTC (rev 22658)
+++ gnucash/trunk/src/register/ledger-core/split-register-control.c	2012-12-17 05:35:27 UTC (rev 22659)
@@ -539,9 +539,7 @@
 
     /* in the mult-line and dynamic modes, we need to hide the old
      * and show the new. */
-    if (((REG_STYLE_AUTO_LEDGER == reg->style) ||
-            (REG_STYLE_JOURNAL     == reg->style) ||
-            info->trans_expanded) &&
+    if (gnc_split_register_current_trans_expanded (reg) &&
             (old_trans_split != new_trans_split))
     {
         VirtualCellLocation vc_loc;
@@ -881,9 +879,7 @@
             SRSaveData *sd;
 
             sd = gnc_split_register_save_data_new(
-                     trans, blank_split, (info->trans_expanded ||
-                                          reg->style == REG_STYLE_AUTO_LEDGER ||
-                                          reg->style == REG_STYLE_JOURNAL));
+                     trans, blank_split, gnc_split_register_current_trans_expanded (reg));
             gnc_table_save_cells (reg->table, sd);
             gnc_split_register_save_data_destroy (sd);
         }



More information about the gnucash-changes mailing list