R-Tree decomposition fails for ConnectionNodes that are selected due to `selection` child without bounds
RTreeNode fails to decompose route graph connections in the scene graph because the element nodes (ConnectionNode
) will have an empty G2DParentNode instance when selected. This node will have nothing under it and thus its bounds will be null. ConnectionNode.getBoundsInLocal
by default is implemented so that it will not ignore null bounds in children. This in turn causes getBoundsInLocal
to return null which will cause the connection node to not get inserted into the spatial search structure because its bounds are null which is not how it should be.
The simplest fix is to change ConnectionNode to implement getBoundsInLocal
by calling getBoundsInLocal(true)
to just ignore null bounds in children.
Edited by Tuukka Lehtonen