Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Strange Link behaviour when moving selection (Read 6024 times)
Benoit Caron
YaBB Newbies
*
Offline



Posts: 10
Joined: Apr 8th, 2009
Strange Link behaviour when moving selection
Apr 8th, 2009 at 8:21pm
Print Post  
Hello everyone,

I have the following:

                                                        ----------------
                                                        |                  |
------------                           ------------|                  |
| Node1 |----------------------| Node2 ||    Node3    |
------------        Link1           ------------|                  |
                                                        |                  |
                                                        ----------------


Node2.Locked = true;
Node2.AttachTo(Node3, AttachToNode.MiddleLeft);


When I select TableNode2 and Link1 (using the selection box) and then move the selection, I end up with the following:

------------
| Node1 |
------------
                                                        ----------------
                                                        |                  |
                                         ------------|                  |
              ----------------------| Node2 ||    Node3    |
                      Link1           ------------|                  |
                                                        |                  |
                                                        ----------------

The link reconnects on the mouse up event.  I only have this behaviour if Node2 is attach to another node.

Have a good day!
  
Back to top
 
IP Logged
 
jmquinlan
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 67
Joined: Apr 2nd, 2009
Re: Strange Link behaviour when moving selection
Reply #1 - Apr 23rd, 2009 at 9:57am
Print Post  
I'm getting something similar when having two table nodes connected with a link, contained within a container node.

If the container node is set to autoshrink, when it shrinks to fit around the nodes the link does not get redrawn correctly.

Code
Select All
containernode
{
           tablenode1 ---------> tablenode2
}
 



if i move tablenode2 down, the container node resizes its self to fit and the resulting diagram ends up looking like:

Code
Select All
containernode
{
           tablenode1------------>
                                              tablenode2
}
 



a work around for this I found was the invalide the containernodes repaint rectangle inside the event callback for NodeModified,:

Code
Select All
         private void m_diagram_NodeModified(object sender, NodeEventArgs e)
        {
            ContainerNode container = ContainerNode.GetContainer(e.Node);
            m_diagram.RouteAllLinks();
            if (container != null)
            {
                m_diagram.Invalidate(container.GetRepaintRect(true));
            }
        } 



regards
  
Back to top
 
IP Logged
 
MUDO
Junior Member
**
Offline



Posts: 90
Joined: Nov 29th, 2008
Re: Strange Link behaviour when moving selection
Reply #2 - May 16th, 2009 at 4:00pm
Print Post  
Hi.

I have smae problem with tables in container. I would like to ask forum moderators if this solution is OK. Is there any other way how to fix it? Because I think its bug so another solution would be better then this one.

Thx.

...MUDO...
  
Back to top
 
IP Logged
 
jmquinlan
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 67
Joined: Apr 2nd, 2009
Re: Strange Link behaviour when moving selection
Reply #3 - May 18th, 2009 at 4:33pm
Print Post  
its definitly a bug in the container nodes, It would definitly be beneficial to everyone in this thread to have this fixed in the api rather than patching up the diagram afterwards.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Strange Link behaviour when moving selection
Reply #4 - May 19th, 2009 at 7:19am
Print Post  
Could anyone post more details on how to reproduce the problem with linked tables in containers?
  
Back to top
 
IP Logged
 
MUDO
Junior Member
**
Offline



Posts: 90
Joined: Nov 29th, 2008
Re: Strange Link behaviour when moving selection
Reply #5 - May 20th, 2009 at 2:29pm
Print Post  
Hi.

I sent sample project to support@mindfusion.eu.

Simply create 1x container, 2x tables in container. Create a link between tables. When you are moving with table the link is coming from (origin table) the destination table is like "unlinked". But after moving destination table everything is ok Smiley

Pls state a conclusion here because this bug is very bothersome for me Sad

Thx.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Strange Link behaviour when moving selection
Reply #6 - May 20th, 2009 at 3:35pm
Print Post  
  
Back to top
 
IP Logged
 
jmquinlan
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 67
Joined: Apr 2nd, 2009
Re: Strange Link behaviour when moving selection
Reply #7 - May 21st, 2009 at 1:04pm
Print Post  
I'll give these a try also thanks for looking in to it, I'll post back an let you know if its fixed the problem. Also i'll disable my hacky code to fix it.
  
Back to top
 
IP Logged
 
MUDO
Junior Member
**
Offline



Posts: 90
Joined: Nov 29th, 2008
Re: Strange Link behaviour when moving selection
Reply #8 - Jun 9th, 2009 at 11:58am
Print Post  
Hi!

Stoyo which version is that? I downloaded trial 5.2.1 version and Im using VS2008 (.NET 3.5) version of DLLs.


So what have I to do to dont disrupt my DLLs and all projects?
Thx.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Strange Link behaviour when moving selection
Reply #9 - Jun 10th, 2009 at 4:47am
Print Post  
You could unzip this file to a new folder, and in the project options -> reference paths pane add that folder to the list of paths where VS looks for assemblies. You could also add the subfolder from the control's installation folder where the official 5.2.1 dlls are located, and switch between the two versions by moving the respective folder to the top of the reference paths list. You might also have to set the "use specific version" attribute for the references to false.

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