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.
This commit is contained in:
Robert Fewell 2022-07-17 12:51:38 +01:00
parent 0a8dcdcd81
commit ce4768c357

View File

@ -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);
}
}