From: Eduardo Davila Date: Fri, 24 Apr 2009 15:26:00 +0000 (+0000) Subject: BUG interaction ROI-creation line, rectangle, circle, X-Git-Tag: EED.02Oct2009~98 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=31d88339e6f5c346ec8542f05c7a9490434ef94f;p=creaMaracasVisu.git BUG interaction ROI-creation line, rectangle, circle, --- diff --git a/lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp b/lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp index 9dc5f2b..987cfa5 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp @@ -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 ); } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx index ac5f3eb..67f26f9 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx @@ -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: @@ -182,17 +182,17 @@ 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; } } //------------------------------------------------------------------------------------------------------------