Modifying a Key

I’ve run into a problem where if I have a diagram with 2 nodes and a link between them, and if I modify the key of one or both of the exisitng nodes and then try to save to XML, in the XML file the saved link reports that the connection is to the previous key (prioir to the change). And so when I load the xml file, it looks right (positions are good) but the link in not attached to the nodes that had their keys modified. So if I move a node the link does not follow.

If I examine the code post change the Link object is reporting the correct ToNode/FromNode information.

Any idea of what I am missing or how to force the XML to refresh it’s to/from key sources so that the latest link information is saved?

For example I modified the FlowGrammer demo to demonstrate my problem - notice that the link is not updated to reflect the key change,

I cannot investigate this right now.

It does not make sense to me that the link would appear correctly on loading if its node key references are wrong.

Do you really need to modify the key?

You could try explicitly modifying the linkdata references when you do change a node key value.

I believe the link appears correctly in the application that I am working on because there is enough position information for both the link and nodes - so everything looks as it should (but the behaviour is not).

In the flow grammer example I gave, the nodes are positioned correctly but the link is not.

When I explicitly access the nodes from the Link object they are correct. I did not think to modify the To and From properties as part of the LinkData - thank-you! updating these along with the Keys solves my problem