Revert "Prevent gnc-commodity from marking the book dirty at file-load."

This reverts commit 8be7d15e1d because it
prevents the book from being marked dirty under most circumstances, not
just when loading commodities.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23767 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
John Ralls 2014-01-25 20:50:55 +00:00
parent 3ad383b97b
commit 53e1954fac
2 changed files with 1 additions and 9 deletions

View File

@ -1078,8 +1078,7 @@ static void
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));

View File

@ -273,8 +273,6 @@ gnc_commodity_end_handler(gpointer data_for_children,
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 @@ gnc_commodity_end_handler(gpointer data_for_children,
{
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))
{