Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Selection after load of custom ndoe type (Read 5723 times)
jdd48
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 10
Joined: Aug 11th, 2008
Selection after load of custom ndoe type
Aug 11th, 2008 at 2:14am
Print Post  
After saving a diagram and then loading it again from disk, I've noticed that before I can select individual nodes and have the moving/sizing handles show up, I must first highlight all of the nodes, then click on the entire selection for the handles to show up on all of the nodes. Only after that can I individually select the custom nodes. Is this a bug, or do I need to maybe set some other property after loading the diagram from disk? Thanks.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3379
Joined: Oct 19th, 2005
Re: Selection after load of custom ndoe type
Reply #1 - Aug 11th, 2008 at 6:32am
Print Post  
Are you using binary or xml serialization? What happens if you call Selection.Clear() just after loading?
  
Back to top
 
IP Logged
 
jdd48
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 10
Joined: Aug 11th, 2008
Re: Selection after load of custom ndoe type
Reply #2 - Aug 11th, 2008 at 11:18am
Print Post  
I'm serializing with the BinaryWriter and BinaryReader provided in the SaveTo and LoadFrom methods. Clearing the selection just after load doesn't seem to remedy the situation. Thanks.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3379
Joined: Oct 19th, 2005
Re: Selection after load of custom ndoe type
Reply #3 - Aug 11th, 2008 at 12:10pm
Print Post  
and you are calling base.LoadFrom() from your custom node LoadFrom implementation?
  
Back to top
 
IP Logged
 
jdd48
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 10
Joined: Aug 11th, 2008
Re: Selection after load of custom ndoe type
Reply #4 - Aug 11th, 2008 at 1:04pm
Print Post  
Yes - the base is called in both LoadFrom and SaveTo. Additional info - after the file is opened, I can add more custom nodes, and they are immediately selectable. However, the existing ones loaded from the file still are not individually selectable until they are all selected and clicked at least one time.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3379
Joined: Oct 19th, 2005
Re: Selection after load of custom ndoe type
Reply #5 - Aug 11th, 2008 at 1:24pm
Print Post  
could you email the file and your custom node code to support@mindfusion.eu?

10x
  
Back to top
 
IP Logged
 
jdd48
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 10
Joined: Aug 11th, 2008
Re: Selection after load of custom ndoe type
Reply #6 - Aug 11th, 2008 at 1:51pm
Print Post  
Done.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3379
Joined: Oct 19th, 2005
Re: Selection after load of custom ndoe type
Reply #7 - Aug 11th, 2008 at 2:04pm
Print Post  
It works fine if you call the base class constructor -
public CustomNode(Diagram dgm) : base(dgm)

  
Back to top
 
IP Logged
 
jdd48
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 10
Joined: Aug 11th, 2008
Re: Selection after load of custom ndoe type
Reply #8 - Aug 11th, 2008 at 2:48pm
Print Post  
Very nice. A bit upset with myself that I didn't think of it before. Thanks!
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3379
Joined: Oct 19th, 2005
Re: Selection after load of custom ndoe type
Reply #9 - Aug 11th, 2008 at 3:02pm
Print Post  
no worries Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint