mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
parent
63f60a302c
commit
6ff63efa19
@ -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 (" ");
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user