From 7202a1e373d8a9bf04623bad7916867d3c1452d5 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Sat, 24 Apr 2021 09:22:45 +0200 Subject: [PATCH] #3460 Clean direction vtkInteractorScrollZ --- .../interface/wxWindows/widgets/vtkInteractorScrollZ.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.47.1