X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FmanualContour%2FmanualContourBaseControler.cpp;h=f96fb484afeea85782bd74c89c561b0f915c57aa;hb=24937478048aca664712bb708240bff79879e0d9;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..f96fb48 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourBaseControler.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourBaseControler.cpp @@ -137,7 +137,6 @@ bool manualContourBaseControler::OnChar() // ---------------------------------------------------------------------------- bool manualContourBaseControler::OnMouseMove() { - if ( _vtkInteractorStyleBaseView!=NULL) { int X,Y; @@ -145,6 +144,7 @@ bool manualContourBaseControler::OnMouseMove() _wxVTKiren= _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor(); _wxVTKiren->GetEventPosition( X , Y ); + printf("EED manualContourBaseControler::OnMouseMove %d %d\n",X,Y); if ( (_vtkInteractorStyleBaseView->GetInteractor()->GetControlKey()==0) && (_vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey()==0) ) { @@ -224,9 +224,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; @@ -260,6 +257,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; @@ -289,9 +290,9 @@ void manualContourBaseControler::MouseDLeft(int x, int y ) { if (_state==0) { - + int z=GetZ(); - bool temp = _manViewBaseCont->SelectPosibleContour(x,y,z); + /*bool temp = */ _manViewBaseCont->SelectPosibleContour(x,y,z); _manViewBaseCont->SelectPosiblePoint(x,y,z); @@ -456,8 +457,9 @@ 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 + GetManualContourModel()->AddPoint(xx,yy,zz); GetManualViewBaseContour()->AddPoint(); // GetManualViewBaseContour()->UpdateViewPoint(id); } @@ -491,6 +493,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);