summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Bignier <paul.bignier@scilab-enterprises.com>2016-12-19 17:24:47 +0100
committerPaul Bignier <paul.bignier@scilab-enterprises.com>2016-12-22 13:47:56 +0100
commit9a44c1552c3662b18ef4961c6a7ac64ff28014fa (patch)
tree1b4134c1a8bc268406799de4aa47ac979df9d484
parent577b61c47dcd396439ebe17da65f10513525a8f2 (diff)
downloadscilab-9a44c1552c3662b18ef4961c6a7ac64ff28014fa.zip
scilab-9a44c1552c3662b18ef4961c6a7ac64ff28014fa.tar.gz
Xcos MVC: do not link new ports with old links
* When cloning a block, the new ports were connected to the old links * This code section imitats Controller::deepClone() Change-Id: I8b2f6e189d48bd052616c709c98d1adcc692eef9
-rw-r--r--scilab/modules/scicos/src/cpp/Controller.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scilab/modules/scicos/src/cpp/Controller.cpp b/scilab/modules/scicos/src/cpp/Controller.cpp
index 951f44a..4b97df0 100644
--- a/scilab/modules/scicos/src/cpp/Controller.cpp
+++ b/scilab/modules/scicos/src/cpp/Controller.cpp
@@ -496,7 +496,7 @@ void Controller::deepCloneVector(std::map<model::BaseObject*, model::BaseObject*
496 } 496 }
497 else 497 else
498 { 498 {
499 cloned.push_back(getObject(id)); 499 cloned.push_back(nullptr);
500 } 500 }
501 } 501 }
502 } 502 }
@@ -504,7 +504,7 @@ void Controller::deepCloneVector(std::map<model::BaseObject*, model::BaseObject*
504 // update the ScicosID related properties after cloning all the objects 504 // update the ScicosID related properties after cloning all the objects
505 if (p == CHILDREN) 505 if (p == CHILDREN)
506 { 506 {
507 for (auto const& it : mapped) 507 for (auto const & it : mapped)
508 { 508 {
509 model::BaseObject* initial = it.first; 509 model::BaseObject* initial = it.first;
510 model::BaseObject* cloned = it.second; 510 model::BaseObject* cloned = it.second;