]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp
BUG interaction ROI-creation line, rectangle, circle,
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / manualContour.cpp
index 9dc5f2b65c2786591d0cf8d683e1f603fba73dc6..987cfa56b6cd4076efea38b5fa1b82922b1a44af 100644 (file)
@@ -4457,7 +4457,7 @@ void manualRoiControler::MouseClickLeft(int x, int y){
                        AddPoint(x,y,z);
                        AddPoint(x,y,z);
                        bakIdPoint = GetManualViewBaseContour()->GetIdPoint(x,y,z);
-                       SetState(5);
+                       SetState(1);
                }
        }
        
@@ -4493,7 +4493,8 @@ void manualRoiControler::MouseMove(int x, int y) // virtual
        GetManualViewBaseContour()->SelectPosibleContour(x,y,z);
        GetManualViewBaseContour()->SelectPosiblePoint(x,y,z);
 
-       if (GetState()==5){
+
+       if ( (GetState()==5) || (GetState()==1) ){
                SetPoint( bakIdPoint , x , y ,z);
                if (bakIdPoint==0)
                {
@@ -4660,7 +4661,7 @@ void manualCircleControler::MouseClickLeft(int x, int y){
                        AddPoint(x,y,z);
                        AddPoint(x,y,z);
                        bakIdPoint = GetManualViewBaseContour()->GetIdPoint(x,y,z);
-                       SetState(5);
+                       SetState(1);
                }
        }       
        
@@ -4690,9 +4691,9 @@ void manualCircleControler::MouseMove(int x, int y) // virtual
        GetManualViewBaseContour()->SelectPosibleContour(x,y,z);
        GetManualViewBaseContour()->SelectPosiblePoint(x,y,z);
 
-       if (GetState()==5){
-               SetPoint( bakIdPoint , x , y ,z);
-       }
+       if (GetState()==1){     SetPoint( bakIdPoint , x , y ,z); }
+       if (GetState()==5){     SetPoint( bakIdPoint , x , y ,z); }
+       
        if (GetState()==6){
                GetManualViewBaseContour()->MoveContour(x,y,z);
        }
@@ -4837,7 +4838,7 @@ void manualLineControler::MouseClickLeft(int x, int y){
                        AddPoint(x,y,z); 
                        AddPoint(x,y,z); 
                        bakIdPoint = GetManualViewBaseContour()->GetIdPoint(x,y,z);     
-                       SetState(5);
+                       SetState(1);
                }
        }
        
@@ -4867,10 +4868,9 @@ void manualLineControler::MouseMove(int x, int y) // virtual
        GetManualViewBaseContour()->SelectPosibleContour(x,y,z);
        GetManualViewBaseContour()->SelectPosiblePoint(x,y,z);
 
-       if (GetState()==5)
-       {       
-               SetPoint( bakIdPoint , x , y ,z); 
-       }
+       if (GetState()==1) { SetPoint( bakIdPoint , x , y ,z); }
+       if (GetState()==5) { SetPoint( bakIdPoint , x , y ,z); }
+       
        if (GetState()==6)
        {       
                GetManualViewBaseContour()->MoveContour(x,y,z);
@@ -5192,8 +5192,10 @@ void manualContourBaseControler::MouseReleaseLeft(int x, int y)
        if (_state==7){ _state = 0; }
        SetMoving( false );
        GetManualViewBaseContour()->SelectPosibleContour(x,y,GetZ());
+printf("EED %p manualContourBaseControler::MouseReleaseLeft 01 \n",this);
        if( GetIfCompleteCreation() && IsEditable() && !GetManualViewBaseContour()->GetPosibleSelected() && (GetManualViewBaseContour()->GetIdPoint(x,y,GetZ())==-1)  )
        {
+printf("EED %p manualContourBaseControler::MouseReleaseLeft 02 \n",this);
                SetEditable( false );
                SetPosibleToMove( false );
        }