[Gnucash-changes] r13350 - gnucash/trunk/src/engine - Mark the GNC_LOT QofCollection dirty whenever a Lot changes.

Chris Shoemaker chris at cvs.gnucash.org
Tue Feb 21 16:44:43 EST 2006


Author: chris
Date: 2006-02-21 16:44:42 -0500 (Tue, 21 Feb 2006)
New Revision: 13350
Trac: http://svn.gnucash.org/trac/changeset/13350

Modified:
   gnucash/trunk/src/engine/gnc-lot.c
Log:
   Mark the GNC_LOT QofCollection dirty whenever a Lot changes.
   This includes when the KVP is changed via the setters. 


Modified: gnucash/trunk/src/engine/gnc-lot.c
===================================================================
--- gnucash/trunk/src/engine/gnc-lot.c	2006-02-21 20:55:48 UTC (rev 13349)
+++ gnucash/trunk/src/engine/gnc-lot.c	2006-02-21 21:44:42 UTC (rev 13350)
@@ -181,6 +181,7 @@
 gnc_lot_set_title (GNCLot *lot, const char *str)
 {
    if (!lot) return;
+   qof_collection_mark_dirty(QOF_ENTITY(lot)->collection);
    return kvp_frame_set_str (lot->kvp_data, "/title", str);
 }
 
@@ -188,6 +189,7 @@
 gnc_lot_set_notes (GNCLot *lot, const char *str)
 {
    if (!lot) return;
+   qof_collection_mark_dirty(QOF_ENTITY(lot)->collection);
    return kvp_frame_set_str (lot->kvp_data, "/notes", str);
 }
 
@@ -243,6 +245,7 @@
         gnc_num_dbg_to_string (split->amount),
         gnc_num_dbg_to_string (split->value));
    acc = xaccSplitGetAccount (split);
+   qof_collection_mark_dirty(QOF_ENTITY(lot)->collection);
    if (NULL == lot->account)
    {
       xaccAccountInsertLot (acc, lot);
@@ -277,6 +280,7 @@
    if (!lot || !split) return;
 
    ENTER ("(lot=%p, split=%p)", lot, split);
+   qof_collection_mark_dirty(QOF_ENTITY(lot)->collection);
    lot->splits = g_list_remove (lot->splits, split);
    split->lot = NULL;
    lot->is_closed = -1;   /* force an is-closed computation */



More information about the gnucash-changes mailing list