Bug 799093 - Cannot reconcile since v5.4

Covers the final case where having the reconcile window open and
auto-completing a transaction then deleting the transaction before
committing it leaves the transaction in the reconcile window.

We need to signal that the account is modified even if it isn't
because that's what the reconcile window is watching.
This commit is contained in:
John Ralls 2024-03-11 10:14:09 +01:00
parent 97953b6d15
commit af18ea598e

View File

@ -720,7 +720,17 @@ xaccFreeSplit (Split *split)
gnc_lot_remove_split (split->lot, split);
if (GNC_IS_ACCOUNT (split->acc)
&& !qof_instance_get_destroying (QOF_INSTANCE (split->acc)))
{
gnc_account_remove_split (split->acc, split);
/* gnc_float_split_to_split generates a qof_event_gen via
* xaccAccountCommitEdit even though it doesn't touch the
* account. That causes QofQueryViews to notice the split
* even though it isn't added to the account. We need a
* countervailing event so that they'll notice it's not
* there any more.
*/
qof_event_gen(&split->acc->inst, QOF_EVENT_MODIFY, nullptr);
}
/* We should do the same for split->parent but we might be getting
* called from xaccFreeTransaction and that would cause trouble.
*/