mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Address bug #339288: When deleting a split, ensure the transaction is 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
This commit is contained in:
parent
a15b9f01d2
commit
1a94c52db0
@ -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;
|
||||
@ -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);
|
||||
|
||||
/* Check pending transaction */
|
||||
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);
|
||||
|
||||
/* Check pending transaction */
|
||||
if (trans == pending_trans)
|
||||
{
|
||||
info->pending_trans_guid = *guid_null ();
|
||||
pending_trans = NULL;
|
||||
}
|
||||
|
||||
gnc_resume_gui_refresh ();
|
||||
gnc_split_register_redraw(reg);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user