X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FmanualContour%2FmanualContourBaseControler.cpp;h=0711912763befc8956c37cb445377bdbf87e8bea;hb=c6481486861a91e8ead2033566097c502488670e;hp=0639b0c611e012aecb665b68f660aeae0fcafe3a;hpb=c016f2efd20188d031f0bc29c5a2bb1aab959adf;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourBaseControler.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourBaseControler.cpp index 0639b0c..0711912 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourBaseControler.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourBaseControler.cpp @@ -156,6 +156,7 @@ bool manualContourBaseControler::OnMouseMove() // ---------------------------------------------------------------------------- bool manualContourBaseControler::OnLeftButtonDown() { + printf("EED %p manualContourBaseControler::OnLeftButtonDown \n",this); SetKeyBoardMoving( false ); if ( _vtkInteractorStyleBaseView!=NULL ) { @@ -171,6 +172,7 @@ bool manualContourBaseControler::OnLeftButtonDown() // ---------------------------------------------------------------------------- bool manualContourBaseControler::OnLeftButtonUp() { + printf("EED %p manualContourBaseControler::OnLeftButtonUp \n",this); if ( _vtkInteractorStyleBaseView!=NULL ) { int X,Y; @@ -184,6 +186,7 @@ bool manualContourBaseControler::OnLeftButtonUp() // ---------------------------------------------------------------------------- bool manualContourBaseControler::OnLeftDClick() { + printf("EED %p manualContourBaseControler::OnLeftDClick \n",this); if ( _vtkInteractorStyleBaseView!=NULL ) { int X,Y; @@ -217,6 +220,7 @@ bool manualContourBaseControler::OnMiddleButtonUp() // ---------------------------------------------------------------------------- bool manualContourBaseControler::OnRightButtonDown() { + printf("EED %p manualContourBaseControler::OnRightButtonDown \n",this); if( _vtkInteractorStyleBaseView!= NULL ) { int X,Y; @@ -224,9 +228,6 @@ bool manualContourBaseControler::OnRightButtonDown() wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor(); wxVTKiren->GetEventPosition(X, Y); - SetCompleteCreation( true ); - SetKeyBoardMoving( false ); - this->GetManualContourModel()->SetCloseContour(true); MouseClickRight(X,Y); } return true; @@ -234,6 +235,7 @@ bool manualContourBaseControler::OnRightButtonDown() // ---------------------------------------------------------------------------- bool manualContourBaseControler::OnRightButtonUp() { + printf("EED %p manualContourBaseControler::OnRightButtonUp \n",this); return true; } // ---------------------------------------------------------------------------- @@ -260,6 +262,10 @@ void manualContourBaseControler::MouseClickLeft(int x, int y) // virtual // ---------------------------------------------------------------------------- void manualContourBaseControler::MouseClickRight(int x, int y) { + SetCompleteCreation( true ); + SetKeyBoardMoving( false ); + this->GetManualContourModel()->SetCloseContour(true); + // if (_state==1) // { // _state=0; @@ -291,7 +297,7 @@ void manualContourBaseControler::MouseDLeft(int x, int y ) { int z=GetZ(); - bool temp = _manViewBaseCont->SelectPosibleContour(x,y,z); + /*bool temp = */ _manViewBaseCont->SelectPosibleContour(x,y,z); _manViewBaseCont->SelectPosiblePoint(x,y,z); @@ -456,8 +462,11 @@ void manualContourBaseControler::AddPoint(int x, int y, int z) // virtual double xx = x; double yy = y; double zz = z; + + GetManualViewBaseContour()->TransfromCoordViewWorld(xx,yy,zz); - /*int id =*/ GetManualContourModel()->AddPoint(xx,yy,zz); // JPRx +printf("EED %p manualContourBaseControler::AddPoint \n", this); + GetManualContourModel()->AddPoint(xx,yy,zz); GetManualViewBaseContour()->AddPoint(); // GetManualViewBaseContour()->UpdateViewPoint(id); } @@ -491,6 +500,7 @@ void manualContourBaseControler::SetPoint( int id ,int x , int y , int z){ // vi double xx = x; double yy = y; double zz = z; + GetManualViewBaseContour()->TransfromCoordViewWorld(xx,yy,zz); manualPoint *mp = _manContModel->GetManualPoint(id); mp->SetPoint(xx,yy,zz);