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


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15002 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Chris Shoemaker 2006-10-11 00:39:44 +00:00
parent e0de0ed5f1
commit 62e8c9b6df

View File

@ -1381,8 +1381,11 @@ gnc_split_register_save (SplitRegister *reg, gboolean do_commit)
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))