r13457 - gnucash/trunk/src/engine - Splits can now keep track of their own rollback state.

Chris Shoemaker chris at cvs.gnucash.org
Fri Mar 3 19:09:04 EST 2006


Author: chris
Date: 2006-03-03 19:09:03 -0500 (Fri, 03 Mar 2006)
New Revision: 13457
Trac: http://svn.gnucash.org/trac/changeset/13457

Modified:
   gnucash/trunk/src/engine/Split.c
   gnucash/trunk/src/engine/Split.h
   gnucash/trunk/src/engine/SplitP.h
Log:
   Splits can now keep track of their own rollback state.
   The Split <-> Account and Split <-> Transaction relationships are now
   treated as properties of the Split.  In terms of the BeginEdit/CommitEdit 
   block, Splits are subordinate to Transactions.  There is no public 
   BeginEdit/CommitEdit block for Splits; changes to Splits should be wrapped
   in their Transaction's Edit-block.

   In the case of the Split <-> Account relationship, the call to
   xaccSplitSetAccount() will be immediately visible from
   xaccSplitGetAccount(), but the Account does not learn about the
   Split until and if the edit is committed.

   In the case of the Split <-> Transaction relationship, calling
   xaccSplitSetParent() will immediately add the Split to the
   Transactions split list.  This is because the Split's Transaction
   owns the reference to the Split.  However, see the Transaction.c 
   patch for how to distinguish pre-edit state from in-edit state.

   In both cases, events are not generated until the edits are committed.
   Most of this new logic is in an engine-private helper xaccSplitCommitEdit(),
   which is called from xaccTransCommitEdit().

   Incidental:
      Increased error-checking in xaccSplitSetValue().
      Internalize a Transaction Begin/Commit edit-block in every setter func.





More information about the gnucash-patches mailing list