My application uses nodes extending GoBoxNode I will refer to as GNodes. The Body of GNode holds two GoListGroup which might expand and collapse. Every GNode has its Port.IsValidTo and Port.IsValidFrom set to false and instead got 4 ports added: NorthPort, SouthPort, WestPort and EastPort. Each port is positioned exactly on the border of the GNode.Port and get re-positioned after any collapse/expand operation via LayoutChildren(…).
If I create an instance of GNode and add it to my GoDocument everything works fine. However, if I create a copy of GNode (called faultyNode below) and adding it to the Document by calling
Doc.AddCopy(faultyNode, dropNodePoint);the position of the four ports doesn't get changed as soon as I collapse/expand a GoListGroup of faultyNode.
The same applies if I copy a whole GoDocument containing GNodes and work on the GNodes of the copied GoDocument.
Why is this so and how can I change the default behaviour other than creating another copy of GNode manually?