From ce4768c35762719316739b1fbd377b4788bd1c26 Mon Sep 17 00:00:00 2001 From: Robert Fewell <14uBobIT@gmail.com> Date: Sun, 17 Jul 2022 12:51:38 +0100 Subject: [PATCH] Bug 798565 - Import map editor entry deletion When a top level bayesian entry is deleted, the book is not marked dirty and so the save button is not highlighted. Deleting individual entries did mark book dirty. Fixed in gnc_account_delete_all_bayes_maps by wrapping the deletion with xaccAccountBeginEdit/CommitEdit block. --- libgnucash/engine/Account.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libgnucash/engine/Account.cpp b/libgnucash/engine/Account.cpp index 908d43e324..a0fcd49e1c 100644 --- a/libgnucash/engine/Account.cpp +++ b/libgnucash/engine/Account.cpp @@ -6101,10 +6101,13 @@ gnc_account_delete_all_bayes_maps (Account *acc) { auto slots = qof_instance_get_slots_prefix (QOF_INSTANCE (acc), IMAP_FRAME_BAYES); if (!slots.size()) return; + xaccAccountBeginEdit (acc); for (auto const & entry : slots) { qof_instance_slot_path_delete (QOF_INSTANCE (acc), {entry.first}); } + qof_instance_set_dirty (QOF_INSTANCE(acc)); + xaccAccountCommitEdit (acc); } }