]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourBaseControler.cpp
*** empty log message ***
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / manualContour / manualContourBaseControler.cpp
index d5925e7b2359f85c17ed17b93425f73987d0d8fd..f96fb484afeea85782bd74c89c561b0f915c57aa 100644 (file)
@@ -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,10 +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);
        }