AUDIT: r21743 - gnucash/trunk/src - Clean up some more cases where KVP was set without committing an edit.
Geert Janssens
janssens-geert at telenet.be
Mon Dec 19 10:12:45 EST 2011
On 19-12-11 01:47, John Ralls wrote:
> Author: jralls
> Date: 2011-12-18 19:47:20 -0500 (Sun, 18 Dec 2011)
> New Revision: 21743
> Trac: http://svn.gnucash.org/trac/changeset/21743
>
> Modified:
> gnucash/trunk/src/business/business-gnome/dialog-payment.c
> gnucash/trunk/src/engine/Scrub.c
> gnucash/trunk/src/engine/gnc-lot.c
> gnucash/trunk/src/engine/gncInvoice.c
> gnucash/trunk/src/engine/gncOwner.c
> Log:
> Clean up some more cases where KVP was set without committing an edit.
>
> BP
>
> Modified: gnucash/trunk/src/business/business-gnome/dialog-payment.c
> ===================================================================
> --- gnucash/trunk/src/business/business-gnome/dialog-payment.c 2011-12-19 00:47:11 UTC (rev 21742)
> +++ gnucash/trunk/src/business/business-gnome/dialog-payment.c 2011-12-19 00:47:20 UTC (rev 21743)
> @@ -243,10 +243,11 @@
> value = kvp_value_new_guid(xaccAccountGetGUID(acc));
> if (!value) return;
>
> + xaccAccountBeginEdit (acc);
> kvp_frame_set_slot_path(slots, value, "payment", "last_acct", NULL);
> + qof_instance_set_dirty (QOF_INSTANCE (acc));
> + xaccAccountCommitEdit (acc);
> kvp_value_delete(value);
> -
> - /* XXX: FIXME: Need a commit_edit here to save the data! */
> }
>
Great ! I was about to commit a patch for this one as well using
qof_book_set_dirty, but your method seems much cleaner. I'll fix my
changes in the aqbanking module as well to match this scheme.
Geert
More information about the gnucash-devel
mailing list