Commit 9fb9b44d authored by Frédéric Larue's avatar Frédéric Larue

Default NavigationControl wheel event now behaves in a perfectly reversible way.

parent a3de4319
......@@ -103,7 +103,11 @@ void GLViewer::NavigationControl::wheelEvent( double delta, QWheelEvent* evt )
{
GLViewer &v = *GetViewer();
delta *= -0.0005 * v.distToFocusPoint();
delta *= -0.0005;
if( delta < 0.0 )
delta = delta / (1.0-delta);
delta *= v.distToFocusPoint();
if( v.distToFocusPoint() + delta > 0.0 )
v.setDistToFocusPoint( v.distToFocusPoint() + delta );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment