Skip to content

Improve GraphView I/O handling

Olivier BICHLER requested to merge fix_graphio into dev

This MR improves GraphView I/O handling:

  • Added docstring that specifies setOrderedInputs() and setOrderedOutputs();
  • Added a new method addOrderedOutputs();
  • Automatically update nodes GraphView I/O when adding a connection with addChild() or removing one with removeChild();
  • Removed updateInputsOutputs() which has no purpose anymore;
  • Have a consistent behavior for removing nodes vs adding ones:
    • Before: both removeChild() and removeParent() had to be called to not corrupt the graph!
    • Make removeChild() also remove old child parent by calling removeParent() internally, so it leaves the graph in a correct state;
    • Make removeParent() private, like addParent();
    • Commented out (now private) popParent(), which has no purpose currenlty.
  • Fixed Node::removeView() which was not working.

This should close #185 (closed).

  • Remaining issue: I had to put resetConnections() before remove() loop in GraphView::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

Merge request reports

Loading