Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Undo Manager (Read 1808 times)
koosala
Full Member
***
Offline


Java Happens

Posts: 136
Joined: May 13th, 2007
Undo Manager
Nov 6th, 2009 at 3:20am
Print Post  
Hi,

I might be using a slightly older version, but I hope things haven't changed much. I had two questions on the Undo capability.

1. Is it possible to pause the undo-states capturing.
I.e. I have overridden the canvas to extend its behavior, and at times there are some state changes I do programmatically, and then user interacts with the boxes and lines, and changes the state again. I would like to not capture the programmatic changes in the undo stack.

I also see a
[code] void enable(boolean enabled) { undoEnabled = enabled; }[/code]
which doesn't clear the history. Can I make that public and use it, or can you forsee any problems there?

2. Trying out the undo feature, it looked to me like applying a color to a box was not captured in the history. Are there any other such operations that aren't undoable?

Appreciate your help!

Thanks,
Praveen
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Undo Manager
Reply #1 - Nov 6th, 2009 at 8:55am
Print Post  
Hi Praveen,

1. You could use the actionRecording event to filter out some undo records if you have it in your version.

2. Assignments to item properties are not recorded automatically. You must enclose them between cmd = new ChangeItemCmd(... ) / cmd.execute() calls.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint