Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic UndoManager (Read 1396 times)
mberger
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 44
Joined: Jan 6th, 2009
UndoManager
Oct 19th, 2009 at 2:00pm
Print Post  
Hi,

i have some problems with the UndoManager in my Diagram. In my application i create and add nodes depending on some diagramevents.

Is it possible to access the CommandList in the undomanger history and delete some commands?

greeze Marco
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: UndoManager
Reply #1 - Oct 19th, 2009 at 2:24pm
Print Post  
Hi,

You could handle the Diagram.ActionRecording event and set e.Cancel = true to prevent some action being recorded.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
mberger
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 44
Joined: Jan 6th, 2009
Re: UndoManager
Reply #2 - Oct 19th, 2009 at 2:51pm
Print Post  
Hi Stoyo,

i know that i could filter the rcorded commands with this event. The Problem is, that i create and add nodes depending on some diagramevents. For example:

1. mouseclick
create OriginNode, create DestinationNode and create DiagramLink

2. mouseclick
old DestinationNode = new OriginNode, create new DestinationNode, create new DiagramLink

and so on..., until i cancel the chaincreation of the notes by rightclick.

The rightclick deletes the new DestinationNode and the DiagramLink.

i have tried to create a composite command with the delet command of the DetinationNode and DiagramLink and create a composite command of this two delete commands. After this i tried to filter the created composite command and cancel the recording.

This works fine, but now i have some problems if i try to undo the previously action.

... sorry for my realy poor english  Cheesy

greeze Marco
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: UndoManager
Reply #3 - Oct 19th, 2009 at 6:57pm
Print Post  
Hi Marco,

Do you need the creation of this whole chain of nodes to be saved as a single composite command?

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint