[Gnucash-changes] r12197 - gnucash/trunk/src/engine - remove random qof_commit_edit from xaccSplitSetSlots_nc

Derek Atkins warlord at MIT.EDU
Thu Dec 29 10:01:14 EST 2005


Quoting Chris Shoemaker <c.shoemaker at cox.net>:

> On Thu, Dec 29, 2005 at 12:27:21AM -0500, Derek Atkins wrote:
>> If it's unbalanced, the proper fix here is to add a begin_edit,
>> not to remove the commit_edit.
>
> Nope.  SplitSetters don't do their own begin/commit.  It's a
> bug.
>
> -chris

The problem is that the engine needs to ASSURE that the split (well,
Transaction in this case) is marked dirty when the KVP is modified.
The way you mark an object as dirty is to perform a begin_edit/commit_edit
pair.    And yes, SplitSetters DO do their own begin/commit, to make
sure that the object gets marked dirty in case the caller of the API
neglects to begin/commit themselves.

This is also why we handle nested begin/commit calls.

-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