From: corredor <> Date: Fri, 30 Apr 2010 14:53:26 +0000 (+0000) Subject: A little bug to delete the boxes (only boxes) was fixed X-Git-Tag: v1_0_0~92 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=eb3935b003323df5cdf891b0ec00da70d1512912;p=bbtkGEditor.git A little bug to delete the boxes (only boxes) was fixed --- diff --git a/lib/EditorGraphicBBS/bbsKernelEditorGraphic/wxVtkSceneManager.cxx b/lib/EditorGraphicBBS/bbsKernelEditorGraphic/wxVtkSceneManager.cxx index 7419d39..77da812 100644 --- a/lib/EditorGraphicBBS/bbsKernelEditorGraphic/wxVtkSceneManager.cxx +++ b/lib/EditorGraphicBBS/bbsKernelEditorGraphic/wxVtkSceneManager.cxx @@ -221,7 +221,6 @@ namespace bbtk GObjectController* controller = GObjectsMVCFactory::getInstance()->createGObjectController(type); model->registerInBox(blackBox,portType, posInBox); - blackBox->addOutputPort(model); model->setBBTKType(bbtkType); model->setBBTKName(bbtkName); @@ -652,29 +651,29 @@ namespace bbtk if(control->getGObjectType()==GBLACKBOX) { GBlackBoxModel *bbmod = (GBlackBoxModel*)control->getModel(); - std::vectorinputs = bbmod->getInputPorts(); + std::vector inputs = bbmod->getInputPorts(); for(int i = 0;igetObjectId()); + controllersToRemove.push_back(inputs[i]->getObjectId()); } - std::vectoroutputs = bbmod->getOutputPorts(); + std::vector outputs = bbmod->getOutputPorts(); for(int i = 0;igetObjectId()); } - controllersToRemove.push_back(control->getId()); + controllersToRemove.push_back(bbmod->getObjectId()); } for(int i = 0;iremoveFromScene(); - unregisterController((InteractorStyleMaracas*)cont); + unregisterController((InteractorStyleMaracas*)cont); _controllers.erase(id); } @@ -753,12 +752,12 @@ namespace bbtk int i; for(i = 0; i