]> Creatis software - creaMaracasVisu.git/commitdiff
BUG interaction ROI-creation line, rectangle, circle,
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Fri, 24 Apr 2009 15:26:00 +0000 (15:26 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Fri, 24 Apr 2009 15:26:00 +0000 (15:26 +0000)
lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx

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 );
        }
index ac5f3ebc5eb604c5f9021af0d84ce1d8cf6d5cac..67f26f99e7f3c805d22d9f460656341a0944a3aa 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracas_ViewerWidget.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/04/24 12:25:31 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2009/04/24 15:26:02 $
+  Version:   $Revision: 1.9 $
 
   Copyright: (c) 2002, 2003
   License:
          
        wxMaracas_ViewerWidget::~wxMaracas_ViewerWidget()
        {
-               if (mvtkmprbasedata) { delete mvtkmprbasedata;  }
-               if (mvtk2Dbaseview) { delete mvtk2Dbaseview; }
-               if (mvtkmpr2Dview_X) { delete mvtkmpr2Dview_X; }
-               if (mvtkmpr2Dview_Y) { delete mvtkmpr2Dview_Y; }
-               if (mvtkmpr2Dview_Z) { delete mvtkmpr2Dview_Z; }
-               if (mwidgetMesure) { delete mwidgetMesure; }
-               if (mvtkplane2Dview) { delete mvtkplane2Dview; }
-               if (mwxsphereview) { delete mwxsphereview; }
-               if (mwxvtkclipping3Dview) { delete mwxvtkclipping3Dview; }
-               if (mwxvtk3Dbaseview_Clipping3D) { delete mwxvtk3Dbaseview_Clipping3D; }
-               if (mwxvtkmpr3Dview) { delete mwxvtkmpr3Dview; }
+               if (mvtkmprbasedata)                    { delete mvtkmprbasedata;  }
+               if (mvtk2Dbaseview)                             { delete mvtk2Dbaseview; }
+               if (mvtkmpr2Dview_X)                    { delete mvtkmpr2Dview_X; }
+               if (mvtkmpr2Dview_Y)                    { delete mvtkmpr2Dview_Y; }
+               if (mvtkmpr2Dview_Z)                    { delete mvtkmpr2Dview_Z; }
+               if (mwidgetMesure)                              { delete mwidgetMesure; }
+               if (mvtkplane2Dview)                    { delete mvtkplane2Dview; }
+               if (mwxsphereview)                              { delete mwxsphereview; }
+               if (mwxvtkclipping3Dview)               { delete mwxvtkclipping3Dview; }
+               if (mwxvtk3Dbaseview_Clipping3D){ delete mwxvtk3Dbaseview_Clipping3D; }
+               if (mwxvtkmpr3Dview)                    { delete mwxvtkmpr3Dview; }
 
        }
        //------------------------------------------------------------------------------------------------------------