mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
If you use the autocomplete and cancel other registers are not refreshed
When the autocomplete is used the blank transaction gets the copy of the originating transaction and if you decide to cancel this any other open register that had a split in the new transaction is left with blank rows where the transaction was. Add a test for the pending and blank transaction being equal and refresh all registers if so.
This commit is contained in:
parent
3363736f9c
commit
db663a298e
@ -1365,11 +1365,17 @@ void
|
||||
gnc_split_register_cancel_cursor_trans_changes (SplitRegister *reg)
|
||||
{
|
||||
SRInfo *info = gnc_split_register_get_info (reg);
|
||||
Transaction *pending_trans;
|
||||
Transaction *pending_trans, *blank_trans;
|
||||
gboolean refresh_all = FALSE;
|
||||
|
||||
pending_trans = xaccTransLookup (&info->pending_trans_guid,
|
||||
gnc_get_current_book ());
|
||||
|
||||
blank_trans = xaccSplitGetParent (gnc_split_register_get_blank_split (reg));
|
||||
|
||||
if (pending_trans == blank_trans)
|
||||
refresh_all = TRUE;
|
||||
|
||||
/* Get the currently open transaction, rollback the edits on it, and
|
||||
* then repaint everything. To repaint everything, make a note of
|
||||
* all of the accounts that will be affected by this rollback. */
|
||||
@ -1389,7 +1395,11 @@ gnc_split_register_cancel_cursor_trans_changes (SplitRegister *reg)
|
||||
info->pending_trans_guid = *guid_null ();
|
||||
|
||||
gnc_resume_gui_refresh ();
|
||||
gnc_split_register_redraw(reg);
|
||||
|
||||
if (refresh_all)
|
||||
gnc_gui_refresh_all (); // force a refresh of all registers
|
||||
else
|
||||
gnc_split_register_redraw (reg);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user