Xcos MVC: Allow Link addition before Block addition (to diagram) 26/15326/6
authorPaul Bignier <paul.bignier@scilab-enterprises.com>
Tue, 7 Oct 2014 08:40:50 +0000 (10:40 +0200)
committerClément DAVID <clement.david@scilab-enterprises.com>
Fri, 10 Oct 2014 15:24:33 +0000 (17:24 +0200)
commit888935123db165381f7a59967860b1d174a8bcb0
treec7cb3cfddeb2080c8013303115b74970bfda6e1c
parentd2416b22bd6442c231d29cc2b794a7d14a5c513a
Xcos MVC: Allow Link addition before Block addition (to diagram)

 * Now linking at model-level after the additions of all the elements,
so scicos_diagram(blk1, lnk, blk2) works
 * Added fields to DiagramAdapter to get the Links that are defined in the diagram,
but whose Blocks they point to have not been added to the Diagram yet
 * Added the possibility to define Link info only in the Adapter
(needed by Diagram Link getter)
 * In setLinkEnd(), keep all the elements of 'children' instead of removing the ones that are not Blocks,
because the 'from' and 'to' values are indexes of the whole elements list
 * Added a Diagram cloning method to save the Linking info
 * By default (if size(from)=2 or size(to)=2),  'from' designates an output and 'to' an input

Change-Id: I77b2b7ecc2eb0bc5338cfc610e29d812dc9e2892
scilab/modules/scicos/src/cpp/view_scilab/DiagramAdapter.cpp
scilab/modules/scicos/src/cpp/view_scilab/DiagramAdapter.hxx
scilab/modules/scicos/src/cpp/view_scilab/LinkAdapter.cpp
scilab/modules/scicos/src/cpp/view_scilab/LinkAdapter.hxx
scilab/modules/scicos/tests/unit_tests/model/Diagram.dia.ref
scilab/modules/scicos/tests/unit_tests/model/Diagram.tst
scilab/modules/scicos/tests/unit_tests/model/SuperBlock.dia.ref
scilab/modules/scicos/tests/unit_tests/model/SuperBlock.tst