Bug #796687, Tax entity name and type don't get saved. Change frame->set to frame->set_path to create missing frames.

This commit is contained in:
Alex Aycinena 2019-01-17 12:32:33 -08:00
parent 8f4f8a1dc4
commit 217289d037

View File

@ -1164,9 +1164,9 @@ qof_book_set_string_option(QofBook* book, const char* opt_name, const char* opt_
auto frame = qof_instance_get_slots(QOF_INSTANCE(book)); auto frame = qof_instance_get_slots(QOF_INSTANCE(book));
auto opt_path = opt_name_to_path(opt_name); auto opt_path = opt_name_to_path(opt_name);
if (opt_val && (*opt_val != '\0')) if (opt_val && (*opt_val != '\0'))
delete frame->set(opt_path, new KvpValue(g_strdup(opt_val))); delete frame->set_path(opt_path, new KvpValue(g_strdup(opt_val)));
else else
delete frame->set(opt_path, nullptr); delete frame->set_path(opt_path, nullptr);
qof_instance_set_dirty (QOF_INSTANCE (book)); qof_instance_set_dirty (QOF_INSTANCE (book));
qof_book_commit_edit(book); qof_book_commit_edit(book);
} }