Commit aaffb2b1 authored by Frédéric Larue's avatar Frédéric Larue

Bug fix in the navigation in orthographic projection mode.

parent 224c679c
......@@ -62,7 +62,9 @@ void GLViewer::NavigationControl::mouseMoveEvent( double dx, double dy, QMouseEv
}
else if( evt->buttons() & Qt::MidButton )
{
double scaleFactor = 2.0*v.distToFocusPoint() / (v.width()*v.projectionMatrix()(0,0));
double scaleFactor = 2.0 / (v.width()*v.projectionMatrix()(0,0));
if( !v.isProjectionOrthographic() )
scaleFactor *= v.distToFocusPoint();
double scaledDX = dx * scaleFactor;
double scaledDY = dy * scaleFactor;
......
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