Xcos MVC: allow diagram object deletion via scicos_new("Deleted") 13/15713/4
authorPaul Bignier <paul.bignier@scilab-enterprises.com>
Tue, 16 Dec 2014 15:17:49 +0000 (16:17 +0100)
committerPaul Bignier <paul.bignier@scilab-enterprises.com>
Wed, 17 Dec 2014 17:46:43 +0000 (18:46 +0100)
commite3117489f78413bafbd7010f3e83a3b9186f22cc
treee68080cd43e7bb1b81282051f91844ed53ddf9bd
parentbce872924efe5888ff7f1c09d8531dafadd4a088
Xcos MVC: allow diagram object deletion via scicos_new("Deleted")

 * Deleted object return 'mlist("Deleted")'
 * Allow linking to deleted objects (simply return,  but keeping the destination or source value)
 * When cloning a Block or a Diagram, avoid cloning the deleted objects
 * LinkAdapter.cpp: directly return a 'link_t' type instead of using an unnecessary 'types::Double'
 * ports_management.hxx: if a port is not connected, return immediately '0' instead of risking to find deleted objects in 'children'

Change-Id: Iecffab44a736abbefeb2add43161e4d1d96964b2
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/src/cpp/view_scilab/LinkAdapter.cpp
scilab/modules/scicos/src/cpp/view_scilab/ports_management.hxx
scilab/modules/scicos/tests/unit_tests/model/Delete_objects.dia.ref [new file with mode: 0644]
scilab/modules/scicos/tests/unit_tests/model/Delete_objects.tst [new file with mode: 0644]