X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FmanualContour%2FmanualContourControler.cpp;h=33665fb521d4844125a77f29b8aa448a3290b5af;hb=18e94aa5dd7f7d3cd2835906a879253bbd14407b;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..33665fb 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourControler.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourControler.cpp @@ -43,15 +43,13 @@ void manualContourControler::Configure() //virtual // ---------------------------------------------------------------------------- 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 +63,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) @@ -145,6 +144,7 @@ void manualContourControler::MouseDLeft( int x, int y)//virtual manualContourBaseControler::MouseDLeft( x, y); if ( IsEditable() ) { + GetManualViewBaseContour()->AddControlPoints(); GetManualViewBaseContour()->AddTextActor(); GetManualViewBaseContour()->Refresh();