Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Undo / Redo with gouped Boxes (Read 4711 times)
pofra
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 7
Joined: Sep 19th, 2008
Undo / Redo with gouped Boxes
Sep 19th, 2008 at 9:30am
Print Post  

Hi,

i have a problem with redo Action and group's

I have 3 boxes in a group and after a moveto by program, if i move the group by hand its ok, of the main Box the redo ( go to old Position ) change only the position of the main object, the child boxes keeps in place of the moveto action.

what have i done wrong ?
  
Back to top
 
IP Logged
 
pofra
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 7
Joined: Sep 19th, 2008
Re: Undo / Redo with gouped Boxes
Reply #1 - Sep 19th, 2008 at 9:33am
Print Post  
Sorry wrong forum, i use FlowchartX ( 4.1.5 )
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Undo / Redo with gouped Boxes
Reply #2 - Sep 19th, 2008 at 11:55am
Print Post  
Hi,

Try to save undo/redo records for each attached box:

Code
Select All
fcx.BeginUndoRecord
b.BeginUndoRecord True
For Each c In b.SubordinateGroup.AttachedBoxes
	c.BeginUndoRecord True
Next
b.MoveTo 10, 10
For Each c In b.SubordinateGroup.AttachedBoxes
	c.EndUndoRecord
Next
b.EndUndoRecord
fcx.EndUndoRecord
 



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


I love YaBB 1G - SP1!

Posts: 7
Joined: Sep 19th, 2008
Re: Undo / Redo with gouped Boxes
Reply #3 - Sep 20th, 2008 at 8:29am
Print Post  
Hi Stoyo,

now it works, i broke up the groups, moved the boxes and made the groups new.

I think this ist a forgotten feature of groups ( undo/redo handling ) maybe you can fix this in a future version.

thx
PoFra
  
Back to top
 
IP Logged
 
pofra
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 7
Joined: Sep 19th, 2008
Re: Undo / Redo with gouped Boxes
Reply #4 - Sep 20th, 2008 at 9:04am
Print Post  
Hi Stoyo,

there is a similar problem with a group of an arrow with an attached textbox with redo.

Maybe you can give me a tip how i can handle this ?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Undo / Redo with gouped Boxes
Reply #5 - Sep 20th, 2008 at 1:19pm
Print Post  
Why would you need to break the group and create it anew, didn't that code work for you? You might turn it into a method that take a flowchart item /arrow or box/ as an argument, iterates its attached nodes and creates undo records for the move operation.

Stoyan
  
Back to top
 
IP Logged
 
pofra
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 7
Joined: Sep 19th, 2008
Re: Undo / Redo with gouped Boxes
Reply #6 - Sep 22nd, 2008 at 10:38am
Print Post  
Hi Stoyo,

when i didn't break the groups, the attached boxes are moved twice. And the Redo don't work.

  
Back to top
 
IP Logged
 
pofra
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 7
Joined: Sep 19th, 2008
Re: Undo / Redo with gouped Boxes
Reply #7 - Sep 22nd, 2008 at 11:05am
Print Post  
Hi Stoyo,

i changed my code now it works ok.

thx for your advice

Wink Franz
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Undo / Redo with gouped Boxes
Reply #8 - Sep 22nd, 2008 at 12:51pm
Print Post  
great 8)
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint