]> Creatis software - creaMaracasVisu.git/commitdiff
#3460 Clean direction vtkInteractorScrollZ
authorEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Sat, 24 Apr 2021 07:22:45 +0000 (09:22 +0200)
committerEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Sat, 24 Apr 2021 07:22:45 +0000 (09:22 +0200)
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorScrollZ.cxx

index d044094cabcbac7c28c3b58517032fb393acff50..0bf5709cccd28a1bd6460c9709cdd63f5ff91c7a 100644 (file)
@@ -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