AUDIT: r15002 - gnucash/trunk/src/register/ledger-core - Ensure that the blank transaction is marked as the pending transaction
Chris Shoemaker
chris at cvs.gnucash.org
Tue Oct 10 20:39:44 EDT 2006
Author: chris
Date: 2006-10-10 20:39:44 -0400 (Tue, 10 Oct 2006)
New Revision: 15002
Trac: http://svn.gnucash.org/trac/changeset/15002
Modified:
gnucash/trunk/src/register/ledger-core/split-register.c
Log:
Ensure that the blank transaction is marked as the pending transaction
when it is modified. This fixes a bug where editing the blank transaction,
moving off of the transaction line to a split line, leaving the split line
unedited and then closing the register will incorrectly leave the
transaction open without asking.
The bug fixed by this commit is possibly responsible for some of the
crashes like bug #348469.
BP
Modified: gnucash/trunk/src/register/ledger-core/split-register.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/split-register.c 2006-10-11 00:33:51 UTC (rev 15001)
+++ gnucash/trunk/src/register/ledger-core/split-register.c 2006-10-11 00:39:44 UTC (rev 15002)
@@ -1381,8 +1381,11 @@
g_assert_not_reached();
if (trans == blank_trans) {
- /* Don't begin editing the blank trans, because it's already open */
+ /* Don't begin editing the blank trans, because it's
+ already open, but mark it pending now. */
g_assert(xaccTransIsOpen(blank_trans));
+ /* This is now the pending transaction */
+ info->pending_trans_guid = *xaccTransGetGUID(blank_trans);
} else {
PINFO("beginning edit of trans %p", trans);
if (gnc_split_register_begin_edit_or_warn(info, trans))
More information about the gnucash-changes
mailing list