[gnc-lot.c] fix - cache value properly

This commit is contained in:
Christopher Lam 2021-08-31 00:27:16 +08:00
parent 595e126a34
commit c3b50f0b58

View File

@ -498,6 +498,7 @@ gnc_lot_set_title (GNCLot *lot, const char *str)
qof_begin_edit(QOF_INSTANCE(lot));
g_value_init (&v, G_TYPE_STRING);
g_value_set_string (&v, str);
priv->title = g_strdup (str);
qof_instance_set_kvp (QOF_INSTANCE (lot), &v, 1, "title");
qof_instance_set_dirty(QOF_INSTANCE(lot));
gnc_lot_commit_edit(lot);
@ -516,6 +517,7 @@ gnc_lot_set_notes (GNCLot *lot, const char *str)
qof_begin_edit(QOF_INSTANCE(lot));
g_value_init (&v, G_TYPE_STRING);
g_value_set_string (&v, str);
priv->notes = g_strdup (str);
qof_instance_set_kvp (QOF_INSTANCE (lot), &v, 1, "notes");
qof_instance_set_dirty(QOF_INSTANCE(lot));
gnc_lot_commit_edit(lot);