]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourControler.cpp
*** empty log message ***
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / manualContour / manualContourControler.cpp
index 53729c5f13d9b129ea4213e62477ace4a3262165..33665fb521d4844125a77f29b8aa448a3290b5af 100644 (file)
@@ -43,15 +43,13 @@ void manualContourControler::Configure() //virtual
 // ----------------------------------------------------------------------------
 void manualContourControler::MouseClickLeft(int x, int y){
 
-
        bool ok = false;
        int z   = GetZ();
        int size= GetManualViewBaseContour()->GetNumberOfPoints();
 
        // Insert a Control Point with shift+ClickLeft
-       // int tt = GetState();  // JPRx
        vtkRenderWindowInteractor *vtkrenderwindowinteractor = _vtkInteractorStyleBaseView->GetInteractor();
-//EED3131
+
        if( IsEditable() )
        {
                if ( (_vtkInteractorStyleBaseView!=NULL) && (GetState()==0) && ( (vtkrenderwindowinteractor!=NULL) && (vtkrenderwindowinteractor->GetShiftKey()==1) ) )
@@ -65,6 +63,7 @@ void manualContourControler::MouseClickLeft(int x, int y){
                {
                        ok=true;
                        SetState(1);
+                       GetManualContourModel()->SetCloseContour(false);
                        AddPoint(x,y,z);
                }
                // Continuie to Insert Control Points with ClickLeft (After being empty the contour)
@@ -145,6 +144,7 @@ void manualContourControler::MouseDLeft( int x, int y)//virtual
        manualContourBaseControler::MouseDLeft( x, y);
        if ( IsEditable() )
        {
+               
                GetManualViewBaseContour()->AddControlPoints();
                GetManualViewBaseContour()->AddTextActor();
                GetManualViewBaseContour()->Refresh();