Improve GraphView I/O handling
This MR improves GraphView I/O handling:
- Added docstring that specifies
setOrderedInputs()andsetOrderedOutputs(); - Added a new method
addOrderedOutputs(); - Automatically update nodes GraphView I/O when adding a connection with
addChild()or removing one withremoveChild(); - Removed
updateInputsOutputs()which has no purpose anymore; - Have a consistent behavior for removing nodes vs adding ones:
- Before: both
removeChild()andremoveParent()had to be called to not corrupt the graph! - Make
removeChild()also remove old child parent by callingremoveParent()internally, so it leaves the graph in a correct state; - Make
removeParent()private, likeaddParent(); - Commented out (now private)
popParent(), which has no purpose currenlty.
- Before: both
- Fixed
Node::removeView()which was not working.
This should close #185 (moved).
-
Remaining issue: I had to put resetConnections()beforeremove()loop inGraphView::replace(), which prevents the change of the root node. For unknown reason, with the original order, some unit tests fail with unexpected result...
Edited by Olivier BICHLER