gnucash maint: Bug 798565 - Import map editor entry deletion
Robert Fewell
bobit at code.gnucash.org
Sun Jul 17 07:59:40 EDT 2022
Updated via https://github.com/Gnucash/gnucash/commit/ce4768c3 (commit)
from https://github.com/Gnucash/gnucash/commit/0a8dcdcd (commit)
commit ce4768c35762719316739b1fbd377b4788bd1c26
Author: Robert Fewell <14uBobIT at gmail.com>
Date: Sun Jul 17 12:51:38 2022 +0100
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.
diff --git a/libgnucash/engine/Account.cpp b/libgnucash/engine/Account.cpp
index 908d43e32..a0fcd49e1 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);
}
}
Summary of changes:
libgnucash/engine/Account.cpp | 3 +++
1 file changed, 3 insertions(+)
More information about the gnucash-changes
mailing list