]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx
v1.1.0 Feature 1407
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsWxGUIEditorGraphic / wxVtkSceneManager.cxx
index 7a3498b215efe1423e1054427c4700d3c6b4136b..b88f527cad467418da510f634b114e5d0e33699f 100644 (file)
@@ -366,7 +366,7 @@ int wxVtkSceneManager::createGComplexBoxInputPort(std::string inputName) {
 
        //create the output port
        GPortController* portController = createGPort(GOUTPUTPORT, inputName,
-                       "ComplexInputPort", 0, model);
+                       "ComplexOutputPortType","ComplexOutputPortDescriopton", 0, model);
        model->addOutputPort((GPortModel*) portController->getModel());
 
        //Associates the view with the correspondent renderer and the  model.
@@ -424,7 +424,7 @@ int wxVtkSceneManager::createGComplexBoxOutputPort(std::string outputName) {
 
        //create the output port
        GPortController* portController = createGPort(GINPUTPORT, outputName,
-                       "ComplexInputPort", 0, model);
+                       "ComplexInputPort","ComplexInputPortDescription", 0, model);
        model->addInputPort((GPortModel*) portController->getModel());
 
        //Associates the view with the correspondent renderer and the  model.
@@ -448,7 +448,7 @@ int wxVtkSceneManager::createGComplexBoxOutputPort(std::string outputName) {
 int wxVtkSceneManager::createGInputPort(int portType, int posinBox,
                GBoxModel *blackBox, BlackBoxInputDescriptor *desc) {
        GPortController* portController = createGPort(portType, desc->GetName(),
-                       desc->GetTypeName(), posinBox, blackBox);
+                       desc->GetTypeName(), desc->GetDescription(), posinBox, blackBox);
        blackBox->addInputPort((GPortModel*) portController->getModel());
        return portController->getId();
 }
@@ -458,7 +458,7 @@ int wxVtkSceneManager::createGInputPort(int portType, int posinBox,
 int wxVtkSceneManager::createGOutputPort(int portType, int posinBox,
                GBoxModel *blackBox, BlackBoxOutputDescriptor *desc) {
        GPortController* portController = createGPort(portType, desc->GetName(),
-                       desc->GetTypeName(), posinBox, blackBox);
+                       desc->GetTypeName(),desc->GetDescription(), posinBox, blackBox);
        blackBox->addOutputPort((GPortModel*) portController->getModel());
        return portController->getId();
 }
@@ -466,7 +466,7 @@ int wxVtkSceneManager::createGOutputPort(int portType, int posinBox,
 //=========================================================================
 
 GPortController* wxVtkSceneManager::createGPort(int portType,
-               std::string bbtkName, std::string bbtkType, int posInBox,
+               std::string bbtkName, std::string bbtkType, std::string bbtkDescription, int posInBox,
                GBoxModel *blackBox) {
        int type = GPORT;
 
@@ -484,6 +484,7 @@ GPortController* wxVtkSceneManager::createGPort(int portType,
 
        model->setBBTKType(bbtkType);
        model->setBBTKName(bbtkName);
+       model->setBBTKDescription(bbtkDescription);
 
        model->addObserver(view);
        model->addObserver(this);
@@ -1059,6 +1060,7 @@ bool wxVtkSceneManager::OnLeftDClick() {
 bool wxVtkSceneManager::OnChar() 
 {
        bool ok=false;
+       bool oktmp;
        char keyCode    = _vtkInteractorStyleBaseView->GetInteractor()-> GetKeyCode();
        int ctrlkey             = _vtkInteractorStyleBaseView->GetInteractor()->GetControlKey();
         
@@ -1069,11 +1071,12 @@ bool wxVtkSceneManager::OnChar()
                        for (int i = 0; i < (int) _selectedObjects.size(); i++) 
                        {
                                int id = _selectedObjects[i];
-                               printf("EED wxVtkSceneManager::OnChar %d %d\n", i, id);
                                std::map<int, GObjectController*>::iterator it;
                                it = _controllers.find(id);
-                               if (it != _controllers.end()) {
-                                       ok=ok||deleteObject(id);
+                               if (it != _controllers.end()) 
+                               {
+                                       oktmp   =       deleteObject(id);
+                                       ok              =       ok||oktmp;
                                } // if
                        }// for selected objects                
                        if (ok) _selectedObjects.clear();
@@ -1127,7 +1130,6 @@ bool wxVtkSceneManager::deleteObject(int id)
        bool result=true;
        GObjectController *control = _controllers[id];
        std::vector<int> controllersToRemove;
-
        if (control->getGObjectType() == GBLACKBOX || control->getGObjectType()
                        == GCOMPLEXINPUTPORT || control->getGObjectType()
                        == GCOMPLEXOUTPUTPORT) {