Internalize some xaccAccountGroupBegin/CommitEdits into xaccGroupCopyGroup().

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14612 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Chris Shoemaker 2006-08-08 22:12:07 +00:00
parent 63f60a302c
commit 6ff63efa19
2 changed files with 4 additions and 4 deletions

View File

@ -893,6 +893,8 @@ xaccGroupCopyGroup (AccountGroup *to, AccountGroup *from)
if (!from->accounts || !to->book) return;
ENTER (" ");
xaccAccountGroupBeginEdit(to);
xaccAccountGroupBeginEdit(from);
for (node = from->accounts; node; node=node->next)
{
Account *to_acc, *from_acc = node->data;
@ -926,6 +928,8 @@ xaccGroupCopyGroup (AccountGroup *to, AccountGroup *from)
xaccAccountGroupBeginEdit (to_acc->children);
}
}
xaccAccountGroupCommitEdit(from);
xaccAccountGroupCommitEdit(to);
LEAVE (" ");
}

View File

@ -559,11 +559,7 @@ gnc_book_partition_txn (QofBook *dest_book, QofBook *src_book, QofQuery *query)
* routine, and it is not needed for the current usage. */
src_grp = xaccGetAccountGroup (src_book);
dst_grp = xaccGetAccountGroup (dest_book);
xaccAccountGroupBeginEdit (dst_grp);
xaccAccountGroupBeginEdit (src_grp);
xaccGroupCopyGroup (dst_grp, src_grp);
xaccAccountGroupCommitEdit (src_grp);
xaccAccountGroupCommitEdit (dst_grp);
/* Next, run the query */
xaccAccountGroupBeginEdit (dst_grp);