]> Creatis software - bbtkGEditor.git/commitdiff
A little bug to delete the boxes (only boxes) was fixed
authorcorredor <>
Fri, 30 Apr 2010 14:53:26 +0000 (14:53 +0000)
committercorredor <>
Fri, 30 Apr 2010 14:53:26 +0000 (14:53 +0000)
lib/EditorGraphicBBS/bbsKernelEditorGraphic/wxVtkSceneManager.cxx

index 7419d39cdb0bd93c334ab3c3297d0242e703ffc2..77da812bdd22ef2b73ce6aadc0f0b39db3733761 100644 (file)
@@ -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::vector<GPortModel*>inputs = bbmod->getInputPorts();
+                       std::vector<GPortModel*> inputs = bbmod->getInputPorts();
                        
                        for(int i = 0;i<inputs.size();i++)
                        {
-                               controllersToRemove.push_back(inputs[i]->getObjectId());
+                               controllersToRemove.push_back(inputs[i]->getObjectId());                                
                        }
 
-                       std::vector<GPortModel*>outputs = bbmod->getOutputPorts();
+                       std::vector<GPortModel*> outputs = bbmod->getOutputPorts();
 
                        for(int i = 0;i<outputs.size();i++)
                        {
                                controllersToRemove.push_back(outputs[i]->getObjectId());
                        }
 
-                       controllersToRemove.push_back(control->getId());
+                       controllersToRemove.push_back(bbmod->getObjectId());
                }
 
                for(int i = 0;i<controllersToRemove.size();i++)
                {
                        int id = controllersToRemove[i];
-                       GObjectController *cont = _controllers[id];
+                       GObjectController *cont = _controllers[id];                     
                        cont->removeFromScene();
-                       unregisterController((InteractorStyleMaracas*)cont);
+                       unregisterController((InteractorStyleMaracas*)cont);                    
                        _controllers.erase(id);
                }
 
@@ -753,12 +752,12 @@ namespace bbtk
                        int i;
                        for(i = 0; i<packages.size();i++)
                        {
-                               script+="load ";
+                               script+="include ";
                                script+=packages[i];
                                script+="\n";
                        }
 
-                       script+="load std\n";
+                       script+="include std\n";
 
                        for(i = 0; i<boxes.size();i++)
                        {