[Gnucash-changes] r13864 - gnucash/trunk/src/gnome - Remove
some unnecessary BeginEdit/CommitEdit calls.
Derek Atkins
warlord at MIT.EDU
Wed May 3 11:32:53 EDT 2006
Chris Shoemaker <chris at cvs.gnucash.org> writes:
> Modified: gnucash/trunk/src/gnome/gnc-plugin-page-register.c
[snip]
> /* Now update the original with a pointer to the new one */
> - xaccTransBeginEdit(trans);
> kvp_val = kvp_value_new_guid (xaccTransGetGUID(new_trans));
> kvp_frame_set_slot_nc(txn_frame, "reversed-by", kvp_val);
> - xaccTransCommitEdit(trans);
> qof_event_resume();
I think you may still need this BeginEdit/CommitEdit pair here
because there's no transactional auto-commit in setting the
kvp.
> Modified: gnucash/trunk/src/gnome/gnc-split-reg.c
[snip]
> /* Now update the original with a pointer to the new one */
> - xaccTransBeginEdit(trans);
> kvp_val = kvp_value_new_guid (xaccTransGetGUID(new_trans));
> kvp_frame_set_slot_nc(txn_frame, "reversed-by", kvp_val);
> - xaccTransCommitEdit(trans);
Potentially the same thing here...
> Modified: gnucash/trunk/src/gnome/reconcile-list.c
[snip]
> - trans = xaccSplitGetParent(split);
> - xaccTransBeginEdit(trans);
> xaccSplitSetReconcile (split, YREC);
> xaccSplitSetDateReconciledSecs (split, *date);
> - xaccTransCommitEdit(trans);
Don't you want to transactionalize these changes into a single commit?
[snip]
> - trans = xaccSplitGetParent(split);
> - xaccTransBeginEdit(trans);
> xaccSplitSetReconcile (split, recn);
> - xaccTransCommitEdit(trans);
And don't we need to commit this transaction when we're done?
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord at MIT.EDU PGP key available
More information about the gnucash-devel
mailing list