From 6c23ebfdb388ba5951e7d94d4d6f95e3d92cfb27 Mon Sep 17 00:00:00 2001 From: Linas Vepstas Date: Sun, 23 Aug 1998 00:46:07 +0000 Subject: [PATCH] bug fixes git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@1025 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/MultiLedger.c | 10 +++++++--- src/SplitLedger.c | 3 +-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/MultiLedger.c b/src/MultiLedger.c index 062076deb0..ee91868662 100644 --- a/src/MultiLedger.c +++ b/src/MultiLedger.c @@ -349,6 +349,8 @@ xaccLedgerDisplayGeneral (Account *lead_acc, Account **acclist, int ledger_type) void xaccLedgerDisplayRefresh (xaccLedgerDisplay *regData) { + int typo; + /* If we don't really need the redraw, don't do it. */ if (!(regData->dirty)) return; regData->dirty = 0; /* mark clean */ @@ -370,7 +372,7 @@ xaccLedgerDisplayRefresh (xaccLedgerDisplay *regData) /* provide some convenience data for the ture GUI window. * If the GUI wants to display yet other stuff, its on its own. */ - // xaccAccountRecomputeBalance(regData->leader); + xaccAccountRecomputeBalance(regData->leader); regData->balance = xaccAccountGetBalance (regData->leader); regData->clearedBalance = xaccAccountGetClearedBalance (regData->leader); regData->reconciledBalance = xaccAccountGetReconciledBalance (regData->leader); @@ -380,10 +382,12 @@ xaccLedgerDisplayRefresh (xaccLedgerDisplay *regData) * system, income will show up as a credit to a * bank account, and a debit to the income account. * Thus, positive and negative are interchanged */ - if ((INCOME_REGISTER == regData->type) || - (EXPENSE_REGISTER == regData->type)) { + typo = regData->type & REG_TYPE_MASK; + if ((INCOME_REGISTER == typo) || + (EXPENSE_REGISTER == typo)) { regData->balance = - (regData->balance); regData->clearedBalance = - (regData->clearedBalance); + regData->reconciledBalance = - (regData->reconciledBalance); } /* OK, now tell this specific GUI window to redraw itself ... */ diff --git a/src/SplitLedger.c b/src/SplitLedger.c index c763c6ec64..a7cb2caf31 100644 --- a/src/SplitLedger.c +++ b/src/SplitLedger.c @@ -213,8 +213,7 @@ printf ("save split is %p \n", split); if (reg->type & REG_MULTI_LINE) { split_to_modify = split; - } - if (reg->type & REG_DOUBLE_LINE) { + } else { split_to_modify = xaccGetOtherSplit(split); }