Undo multiple operations

15 views
Skip to first unread message

vorp

unread,
Jan 7, 2016, 4:52:32 PM1/7/16
to Authoring Tools Framework
Hello ATF enthusiasts!
I'm running into an Undo issue...
I can't seem to get more than a single SetAttribute() call to appear as a single undo event in the history.
I'm working in a highly customized version of the Circuit Editor sample and have to modify a set of 10-20 node attributes all at once.
The modification works fine, but undo does not.
I've tried wrapping each SetAttribute call inside a DoTransaction like this:
   transactionContext.DoTransaction( () => thisDomNode.SetAttribute(attribute, data), "Set Node Attribute");
I've also bundled all the SetAttributes in a single function then wrapped that function in DoTransaction.

In either case I get only a single SetAttribute to appear in history and be undo-able. Despite having run SetAttribute 10 times it only shows one new line in history.

If anyone has had to do this before, and knows other factors that play into this, I would love to hear from you!

Thanks!
-Len




Reply all
Reply to author
Forward
0 new messages