]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsKernelEditorGraphic/wxVtkSceneManager.cxx
It is possible to delete connections !!!
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsKernelEditorGraphic / wxVtkSceneManager.cxx
index 24099d8c0ddb0b9f355984cfaa738a96b8d9a634..41f2fd5b409f621812ce1f91e5eda5a22ee406f3 100644 (file)
@@ -275,6 +275,7 @@ namespace bbtk
                manContourView->SetColorEditContour(0.5, 0.5, 0.5);
                manContourView->SetColorSelectContour(1, 0.8, 0);
                manContourView->SetWidthLine(1);
+               manContourView->SetShowText(false);
 
                manContourControl->SetModelView( manContourModel , manContourView );
                
@@ -310,6 +311,9 @@ namespace bbtk
                connectorView->setBaseView(_baseView);
                connectorcontroller->setModelAndView(connectorModel,connectorView);
 
+               connectorModel->addObserver(connectorView);
+               connectorModel->addObserver(this);
+
                int newId = _controllers.size();
                connectorcontroller->setId(newId);
                _controllers[newId] = connectorcontroller;
@@ -369,6 +373,7 @@ namespace bbtk
                                {
                                        int id = idController;
                                        _selectedObjects.push_back(id);
+                                       cout<<"RaC wxVtkSceneManager::update _selectedObjects.push_back id:"<<id<<endl;
                                }
 
                        }
@@ -756,6 +761,12 @@ namespace bbtk
                        // Add box controller to be removed
                        controllersToRemove.push_back(bbmod->getObjectId());
                }
+               else if(control->getGObjectType()==GCONNECTOR)
+               {                       
+                       GConnectorModel *conMod = (GConnectorModel*)control->getModel();
+                       cout<<"RaC wxVtkSceneManager::deleteObject id:"<<id<<" modelId:" <<conMod->getObjectId()<<endl;
+                       controllersToRemove.push_back(conMod->getObjectId());
+               }
 
                for(int i = 0;i<controllersToRemove.size();i++)
                {