r23767 - gnucash/trunk/src/backend/xml - Revert "Prevent gnc-commodity from marking the book dirty at file-load."
John Ralls
jralls at code.gnucash.org
Sat Jan 25 15:50:55 EST 2014
Author: jralls
Date: 2014-01-25 15:50:55 -0500 (Sat, 25 Jan 2014)
New Revision: 23767
Trac: http://svn.gnucash.org/trac/changeset/23767
Modified:
gnucash/trunk/src/backend/xml/gnc-backend-xml.c
gnucash/trunk/src/backend/xml/gnc-commodity-xml-v2.c
Log:
Revert "Prevent gnc-commodity from marking the book dirty at file-load."
This reverts commit 8be7d15e1df0171dc2551085629b2588790aea10 because it
prevents the book from being marked dirty under most circumstances, not
just when loading commodities.
Modified: gnucash/trunk/src/backend/xml/gnc-backend-xml.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-backend-xml.c 2014-01-25 13:33:42 UTC (rev 23766)
+++ gnucash/trunk/src/backend/xml/gnc-backend-xml.c 2014-01-25 20:50:55 UTC (rev 23767)
@@ -1078,8 +1078,7 @@
xml_commit_edit (QofBackend *be, QofInstance *inst)
{
if (qof_instance_get_dirty(inst) && qof_get_alt_dirty_mode() &&
- !(qof_instance_get_infant(inst) ||
- qof_instance_get_destroying(inst)))
+ !(qof_instance_get_infant(inst) && qof_instance_get_destroying(inst)))
{
qof_collection_mark_dirty(qof_instance_get_collection(inst));
qof_book_mark_session_dirty(qof_instance_get_book(inst));
Modified: gnucash/trunk/src/backend/xml/gnc-commodity-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-commodity-xml-v2.c 2014-01-25 13:33:42 UTC (rev 23766)
+++ gnucash/trunk/src/backend/xml/gnc-commodity-xml-v2.c 2014-01-25 20:50:55 UTC (rev 23767)
@@ -273,8 +273,6 @@
g_return_val_if_fail(tree, FALSE);
com = gnc_commodity_new(book, NULL, NULL, NULL, NULL, 0);
- gnc_commodity_begin_edit (com);
-
old_com = gnc_commodity_find_currency(book, tree);
if (old_com)
gnc_commodity_copy(com, old_com);
@@ -283,11 +281,6 @@
{
set_commodity_value(achild, com);
}
- /* We're loading from the file. It can't be dirty, even though the
- * commodity set functions have marked it so.
- */
- qof_instance_mark_clean (QOF_INSTANCE (com));
- gnc_commodity_commit_edit (com);
if (!valid_commodity(com))
{
More information about the gnucash-changes
mailing list