]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourBaseControler.cpp
no message
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / manualContour / manualContourBaseControler.cpp
index a2e67a0d9cac1cbd0fb686de2cb4396bb7e9f5a5..8e8782bd23358a316888f68c9756904456d4aa86 100644 (file)
@@ -137,7 +137,6 @@ bool manualContourBaseControler::OnChar()
 // ----------------------------------------------------------------------------
 bool manualContourBaseControler::OnMouseMove()
 {
-       
        if ( _vtkInteractorStyleBaseView!=NULL)
        {
                int X,Y;
@@ -145,7 +144,6 @@ bool manualContourBaseControler::OnMouseMove()
                _wxVTKiren= _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
                _wxVTKiren->GetEventPosition( X , Y );
 
-
                if ( (_vtkInteractorStyleBaseView->GetInteractor()->GetControlKey()==0) &&
                        (_vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey()==0) ) {
                        MouseMove(X,Y);
@@ -156,7 +154,6 @@ bool manualContourBaseControler::OnMouseMove()
 // ----------------------------------------------------------------------------
 bool manualContourBaseControler::OnLeftButtonDown()
 {
-       printf("EED %p manualContourBaseControler::OnLeftButtonDown \n",this);
        SetKeyBoardMoving( false );
        if ( _vtkInteractorStyleBaseView!=NULL )
        {
@@ -172,7 +169,6 @@ bool manualContourBaseControler::OnLeftButtonDown()
 // ----------------------------------------------------------------------------
 bool manualContourBaseControler::OnLeftButtonUp()
 {
-       printf("EED %p manualContourBaseControler::OnLeftButtonUp \n",this);
        if ( _vtkInteractorStyleBaseView!=NULL )
        {
                int X,Y;
@@ -186,7 +182,6 @@ bool manualContourBaseControler::OnLeftButtonUp()
 // ----------------------------------------------------------------------------
 bool manualContourBaseControler::OnLeftDClick()
 {
-       printf("EED %p manualContourBaseControler::OnLeftDClick \n",this);
        if ( _vtkInteractorStyleBaseView!=NULL )
        {
                int X,Y;
@@ -220,7 +215,6 @@ bool manualContourBaseControler::OnMiddleButtonUp()
 // ----------------------------------------------------------------------------
 bool manualContourBaseControler::OnRightButtonDown()
 {
-       printf("EED %p manualContourBaseControler::OnRightButtonDown \n",this);
        if( _vtkInteractorStyleBaseView!= NULL )
        {
                int X,Y;
@@ -228,9 +222,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;
@@ -238,7 +229,6 @@ bool manualContourBaseControler::OnRightButtonDown()
 // ----------------------------------------------------------------------------
 bool manualContourBaseControler::OnRightButtonUp()
 {
-       printf("EED %p manualContourBaseControler::OnRightButtonUp \n",this);
        return true;
 }
 // ----------------------------------------------------------------------------
@@ -265,6 +255,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;
@@ -294,9 +288,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);
 
@@ -461,10 +455,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);
        }