]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourControler.cpp
DFCH: imageUndoRedo + Manual Paint: It doesn't works :s :s
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / manualContour / manualContourControler.cpp
index 53729c5f13d9b129ea4213e62477ace4a3262165..845f3c9d0121f0eee5647aaf10c264bbd5b1dfd4 100644 (file)
@@ -41,17 +41,16 @@ void manualContourControler::Configure() //virtual
 }
 
 // ----------------------------------------------------------------------------
-void manualContourControler::MouseClickLeft(int x, int y){
-
+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 +64,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)
@@ -100,7 +100,7 @@ void manualContourControler::MouseClickLeft(int x, int y){
                SetPosibleToMove( true );
                GetManualViewBaseContour()->SetSelected( GetManualViewBaseContour()->GetPosibleSelected() );
        } // IsEditable
-       
+
        if ( GetState() == 0 && GetManualViewBaseContour()->GetPosibleSelected() )
        {
                SetMoving( true );
@@ -145,6 +145,7 @@ void manualContourControler::MouseDLeft( int x, int y)//virtual
        manualContourBaseControler::MouseDLeft( x, y);
        if ( IsEditable() )
        {
+
                GetManualViewBaseContour()->AddControlPoints();
                GetManualViewBaseContour()->AddTextActor();
                GetManualViewBaseContour()->Refresh();