]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsKernelEditorGraphic/wxVtkSceneManager.cxx
Now the contour is created from the center of the initial port
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsKernelEditorGraphic / wxVtkSceneManager.cxx
index 23ea678c0a0d21ca6bfe58265e8a10e5256724d4..a95d229934a5fdb81b3d3ccd6b6bdcd654c30fa3 100644 (file)
@@ -351,6 +351,25 @@ namespace bbtk
 
                manViewerContour->RefreshContour();
 
+
+               double x,y,z;
+               startPort->getCenter(x,y,z);
+
+               manContourControl->SetState(1);
+               manContourModel->SetCloseContour(false);
+               
+               manContourModel->AddPoint(x,y,z);
+               manViewerContour->AddPoint();
+
+               manContourModel->AddPoint(x,y,z);
+               manViewerContour->AddPoint();
+
+               int bak= manContourControl->GetNumberOfPointsManualContour() - 1;
+               manContourControl->_bakIdPoint=bak;
+               manViewerContour->Refresh();
+
+               manContourControl->SetMoving( false );
+
                registerController((InteractorStyleMaracas*) manContourControl);
 
        }
@@ -385,12 +404,12 @@ namespace bbtk
 
        //=========================================================================
        
-       void wxVtkSceneManager::update(int idObservable,int command)
+       void wxVtkSceneManager::update(int idController,int command)
        {
                
                if(command==INIT_CREATION_CONTOUR)
                {       
-                       GObjectController* cont = _controllers[idObservable];
+                       GObjectController* cont = _controllers[idController];
                        if(cont->getGObjectType() == GPORT)
                        {
                                GPortController* controller = (GPortController*)cont;