From 9a2d29df7fac27a045c2368c0cd072e147d31e0e Mon Sep 17 00:00:00 2001 From: David Hampton Date: Sun, 24 Nov 2002 07:23:19 +0000 Subject: [PATCH] Don't override the previous state on all the transactions in the reconciliation window. Only set those the user identified as reconciled. #95639 git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7536 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 5 +++++ src/gnome/reconcile-list.c | 17 ++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5e8167592b..5e65a5ba95 100644 --- a/ChangeLog +++ b/ChangeLog @@ -52,6 +52,11 @@ 2002-11-23 David Hampton + * src/gnome/reconcile-list.c (gnc_reconcile_list_commit): Don't + override the previous state on all the transactions in the + reconciliation window. Only set those the user identified as + reconciled. #95639 + * src/register/ledger-core/gnc-ledger-display.c (refresh_handler): If there is a current split, then ensure that the transaction containing that split stays in the register. This will make the diff --git a/src/gnome/reconcile-list.c b/src/gnome/reconcile-list.c index 135446daa8..114bce3824 100644 --- a/src/gnome/reconcile-list.c +++ b/src/gnome/reconcile-list.c @@ -722,7 +722,9 @@ gnc_reconcile_list_reconciled_balance (GNCReconcileList *list) /********************************************************************\ * gnc_reconcile_list_commit * - * commit the reconcile information in the list * + * Commit the reconcile information in the list. only change the * + * state of those items marked as reconciled. All others should * + * retain their previous state (none, cleared, voided, etc.). * * * * Args: list - list to commit * * date - date to set as the reconcile date * @@ -744,18 +746,15 @@ gnc_reconcile_list_commit (GNCReconcileList *list, time_t date) for (i = 0; i < list->num_splits; i++) { Transaction *trans; - char recn; split = gtk_clist_get_row_data (clist, i); + if (!g_hash_table_lookup (list->reconciled, split)) + continue; + trans = xaccSplitGetParent(split); - - recn = g_hash_table_lookup (list->reconciled, split) ? YREC : NREC; - xaccTransBeginEdit(trans); - xaccSplitSetReconcile (split, recn); - if (recn == YREC) { - xaccSplitSetDateReconciledSecs (split, date); - } + xaccSplitSetReconcile (split, YREC); + xaccSplitSetDateReconciledSecs (split, date); xaccTransCommitEdit(trans); } }