When we call reparent!, the function only updates the parent node of the current node, but it doesn't update the parent node to add the node as a child. We would expect it to work without calling rechildren!. And the reverse should be also true (adding a child should add the node as the parent)
When we call
reparent!, the function only updates the parent node of the current node, but it doesn't update the parent node to add the node as a child. We would expect it to work without callingrechildren!. And the reverse should be also true (adding a child should add the node as the parent)