X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FmanualContour%2FmanualContourControler.cpp;h=845f3c9d0121f0eee5647aaf10c264bbd5b1dfd4;hb=2725f81fc97c9faa92749159bdbaf9cedeef7af4;hp=53729c5f13d9b129ea4213e62477ace4a3262165;hpb=414da1a291ff4c9d9a946536d3d219e4b5f9e6c2;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourControler.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourControler.cpp index 53729c5..845f3c9 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourControler.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourControler.cpp @@ -41,17 +41,16 @@ void manualContourControler::Configure() //virtual } // ---------------------------------------------------------------------------- -void manualContourControler::MouseClickLeft(int x, int y){ - +void manualContourControler::MouseClickLeft(int x, int y) +{ bool ok = false; int z = GetZ(); int size= GetManualViewBaseContour()->GetNumberOfPoints(); // Insert a Control Point with shift+ClickLeft - // int tt = GetState(); // JPRx vtkRenderWindowInteractor *vtkrenderwindowinteractor = _vtkInteractorStyleBaseView->GetInteractor(); -//EED3131 + if( IsEditable() ) { if ( (_vtkInteractorStyleBaseView!=NULL) && (GetState()==0) && ( (vtkrenderwindowinteractor!=NULL) && (vtkrenderwindowinteractor->GetShiftKey()==1) ) ) @@ -65,6 +64,7 @@ void manualContourControler::MouseClickLeft(int x, int y){ { ok=true; SetState(1); + GetManualContourModel()->SetCloseContour(false); AddPoint(x,y,z); } // Continuie to Insert Control Points with ClickLeft (After being empty the contour) @@ -100,7 +100,7 @@ void manualContourControler::MouseClickLeft(int x, int y){ SetPosibleToMove( true ); GetManualViewBaseContour()->SetSelected( GetManualViewBaseContour()->GetPosibleSelected() ); } // IsEditable - + if ( GetState() == 0 && GetManualViewBaseContour()->GetPosibleSelected() ) { SetMoving( true ); @@ -145,6 +145,7 @@ void manualContourControler::MouseDLeft( int x, int y)//virtual manualContourBaseControler::MouseDLeft( x, y); if ( IsEditable() ) { + GetManualViewBaseContour()->AddControlPoints(); GetManualViewBaseContour()->AddTextActor(); GetManualViewBaseContour()->Refresh();