From d3fc3ba57e0d9614391e0138544651cd5c8faedc Mon Sep 17 00:00:00 2001 From: Chris Shoemaker Date: Tue, 21 Feb 2006 21:46:07 +0000 Subject: [PATCH] Mark the QofCollection as dirty when a new QofEntity is added or removed. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13351 57a11ea4-9604-0410-9ed3-97b8803252fd --- lib/libqof/qof/qofid.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/libqof/qof/qofid.c b/lib/libqof/qof/qofid.c index e8737c4c45..ffe2d22977 100644 --- a/lib/libqof/qof/qofid.c +++ b/lib/libqof/qof/qofid.c @@ -182,6 +182,7 @@ qof_collection_remove_entity (QofEntity *ent) col = ent->collection; if (!col) return; g_hash_table_remove (col->hash_of_entities, &ent->guid); + qof_collection_mark_dirty(col); ent->collection = NULL; } @@ -193,6 +194,7 @@ qof_collection_insert_entity (QofCollection *col, QofEntity *ent) g_return_if_fail (col->e_type == ent->e_type); qof_collection_remove_entity (ent); g_hash_table_insert (col->hash_of_entities, &ent->guid, ent); + qof_collection_mark_dirty(col); ent->collection = col; } @@ -208,6 +210,7 @@ qof_collection_add_entity (QofCollection *coll, QofEntity *ent) e = qof_collection_lookup_entity(coll, &ent->guid); if ( e != NULL ) { return FALSE; } g_hash_table_insert (coll->hash_of_entities, &ent->guid, ent); + qof_collection_mark_dirty(coll); return TRUE; }