Xcos MVC: fix diagram cloning 48/17548/7
authorPaul Bignier <paul.bignier@scilab-enterprises.com>
Mon, 7 Dec 2015 16:03:39 +0000 (17:03 +0100)
committerClément DAVID <clement.david@scilab-enterprises.com>
Thu, 17 Dec 2015 07:04:42 +0000 (08:04 +0100)
commitfb20c5981c653fb61a33cfda664260e2525fc90a
tree2533199987ae5f78b08fcff92bca407b61007914
parent9ed2dfef3775a9ce4a9c00d3fec42271e560934f
Xcos MVC: fix diagram cloning

 * Generate the adapters chain when it is absent
 * Mainly used by Xcos GUI's Compile & Start actions, so simple simulations now pass! (Superblocks don't work yet)
 * Scicos tests: only Deep_cloning was really affected (only place where a Diagram was cloned at model-level)

grep --include=Deep_cloning.dia.ref "objectCreated" -r | wc -l #151
grep --include=Deep_cloning.dia.ref "objectDeleted" -r | wc -l #151
grep --include=Diagram_cloning.dia.ref "objectCreated" -r | wc -l #33
grep --include=Diargam_cloning.dia.ref "objectDeleted" -r | wc -l #33

Change-Id: Ib41dce8c02a3851666b73ea89bb21edce9271735
19 files changed:
scilab/modules/scicos/src/cpp/Controller.cpp
scilab/modules/scicos/src/cpp/view_scilab/BlockAdapter.cpp
scilab/modules/scicos/src/cpp/view_scilab/DiagramAdapter.cpp
scilab/modules/scicos/tests/unit_tests/model/Block.dia.ref
scilab/modules/scicos/tests/unit_tests/model/Block_copy_list.dia.ref
scilab/modules/scicos/tests/unit_tests/model/Consecutive_init.dia.ref
scilab/modules/scicos/tests/unit_tests/model/Deep_cloning.dia.ref
scilab/modules/scicos/tests/unit_tests/model/Delete_objects.dia.ref
scilab/modules/scicos/tests/unit_tests/model/Diagram.dia.ref
scilab/modules/scicos/tests/unit_tests/model/Diagram_cloning.dia.ref [new file with mode: 0644]
scilab/modules/scicos/tests/unit_tests/model/Diagram_cloning.tst [new file with mode: 0644]
scilab/modules/scicos/tests/unit_tests/model/SubDiagram_context.dia.ref
scilab/modules/scicos/tests/unit_tests/model/SuperBlock.dia.ref
scilab/modules/scicos/tests/unit_tests/model/SuperBlock_in_SuperBlock.dia.ref
scilab/modules/scicos/tests/unit_tests/model/clone_extract.dia.ref
scilab/modules/scicos/tests/unit_tests/model/from_mlist.dia.ref
scilab/modules/scicos/tests/unit_tests/model/link_preservation.dia.ref
scilab/modules/scicos/tests/unit_tests/model/prop_wrong.dia.ref
scilab/modules/scicos/tests/unit_tests/model/simple_delete.dia.ref