X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FvtkInteractorScrollZ.cxx;h=0bf5709cccd28a1bd6460c9709cdd63f5ff91c7a;hb=15112ae15da4222831b0e8e7c9be87daf9e99a1c;hp=f01b79bb99e6bcae48a2ace8ad3d93332528e7d0;hpb=78a76d83140ed2adf38b8906f5d9fbfde1186c9a;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorScrollZ.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorScrollZ.cxx index f01b79b..0bf5709 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorScrollZ.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorScrollZ.cxx @@ -66,24 +66,18 @@ bool vtkInteractorScrollZ::OnRightButtonUp() //--------------------------------------------------------------------------- bool vtkInteractorScrollZ::OnMouseMove () { - if (_stateFordware==true){ - //int fx = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0]; // JPRx - int fy = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1]; - double delta = (_fordwareY - fy)/(3.0*3); - /*JCP 14/05/2009 - _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->SetActualSlice( _sliceZ + delta); - */ + if (_stateFordware==true) + { + int fy = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1]; + double delta = (_fordwareY - fy)/(20.0); + int direction = ((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->GetDirection( ); + if ( (direction==0) || (direction==2) ) + { + delta=(-1)*delta; + } // if direction ((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->SetActualSlice( _sliceZ + (int)delta ); - this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting(); - - // wxCommandEvent newevent(wxEVT_COMMAND_MENU_SELECTED,12121); - // _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent); - -//EED 21 oct 2010 -//printf("EED vtkInteractorScrollZ::OnMouseMove \n"); -// ((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->Refresh(); - } + } // if _stateFordware return true; }