Allow nested begin/commit in xaccTransSetTxnType(). Fixes #331771.

The old code wouldn't let you set the value if you were already
	  within a BeginEdit/CommitEdit block.



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13316 57a11ea4-9604-0410-9ed3-97b8803252fd
zzzoldfeatures/register-rewrite
Derek Atkins 21 years ago
parent 0fdea46ecd
commit e4bca4ad0b

@ -1,3 +1,10 @@
2006-02-19 Derek Atkins <derek@ihtfp.com>
* src/engine/Transaction.c:
Allow nested begin/commit in xaccTransSetTxnType(). Fixes #331771.
The old code wouldn't let you set the value if you were already
within a BeginEdit/CommitEdit block.
2006-02-19 Chris Lyttle <chris@wilddev.net>
* NEWS: Added some text about the release.

@ -2606,7 +2606,7 @@ xaccTransSetTxnType (Transaction *trans, char type)
{
char s[2] = {type, '\0'};
g_return_if_fail(trans);
if (!qof_begin_edit(&trans->inst)) return;
qof_begin_edit(&trans->inst);
kvp_frame_set_str (trans->inst.kvp_data, TRANS_TXN_TYPE_KVP, s);
qof_instance_set_dirty(QOF_INSTANCE(trans));
qof_commit_edit(&trans->inst);

Loading…
Cancel
Save