From: Eduardo DAVILA Date: Sat, 24 Apr 2021 07:22:45 +0000 (+0200) Subject: #3460 Clean direction vtkInteractorScrollZ X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=7202a1e373d8a9bf04623bad7916867d3c1452d5;p=creaMaracasVisu.git #3460 Clean direction vtkInteractorScrollZ --- diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorScrollZ.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorScrollZ.cxx index d044094..0bf5709 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorScrollZ.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorScrollZ.cxx @@ -69,7 +69,12 @@ bool vtkInteractorScrollZ::OnMouseMove () if (_stateFordware==true) { int fy = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1]; - double delta = (_fordwareY - fy)/(3.0*3); + 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(); } // if _stateFordware