Skip to content

Commit

Permalink
Address bug #339288: When deleting a split, ensure the transaction i…
Browse files Browse the repository at this point in the history
…s open

  for editing, an redraw the display afterward.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13865 57a11ea4-9604-0410-9ed3-97b8803252fd
  • Loading branch information
spot committed Apr 27, 2006
1 parent a15b9f0 commit 1a94c52
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions src/register/ledger-core/split-register.c
Expand Up @@ -798,7 +798,6 @@ gnc_split_register_delete_current_split (SplitRegister *reg)
Transaction *pending_trans;
Transaction *trans;
Split *blank_split;
Account *account;
Split *split;

if (!reg) return;
Expand All @@ -825,23 +824,21 @@ gnc_split_register_delete_current_split (SplitRegister *reg)

gnc_suspend_gui_refresh ();

/* make a copy of all of the accounts that will be
* affected by this deletion, so that we can update
* their register windows after the deletion. */
trans = xaccSplitGetParent(split);

account = xaccSplitGetAccount (split);

xaccSplitDestroy (split);

/* Check pending transaction */
if (trans == pending_trans)
{
info->pending_trans_guid = *guid_null ();
pending_trans = NULL;
if (trans == pending_trans) {
g_assert(xaccTransIsOpen(trans));
} else {
g_assert(!pending_trans);
g_assert(!xaccTransIsOpen(trans));
xaccTransBeginEdit(trans);
info->pending_trans_guid = *xaccTransGetGUID(trans);
}
xaccSplitDestroy (split);

gnc_resume_gui_refresh ();
gnc_split_register_redraw(reg);
}

void
Expand Down

0 comments on commit 1a94c52

Please sign in to comment.