Commit c2302bbb authored by Frédéric Larue's avatar Frédéric Larue
Browse files

CTRL+SHIFT+Mouse wheel now gives the possibility to change the field of view angle.

parent 81055241
......@@ -1778,15 +1778,22 @@ void GLViewer::wheelEvent( QWheelEvent* evt )
{
if( !isSelectionEnabled() )
{
double deltaD = -0.0005 * m_SpeedFactor * distToFocusPoint() * evt->delta();
if( (evt->modifiers() & Qt::ShiftModifier ) && (evt->modifiers() & Qt::ControlModifier) )
{
setFovY( fovY() + evt->delta()*M_PI/180.0f );
}
else
{
double deltaD = -0.0005 * m_SpeedFactor * distToFocusPoint() * evt->delta();
if( evt->modifiers() & Qt::ShiftModifier )
deltaD *= m_ShiftSpeedFactor;
else if( evt->modifiers() & Qt::ControlModifier )
deltaD *= m_CtrlSpeedFactor;
if( evt->modifiers() & Qt::ShiftModifier )
deltaD *= m_ShiftSpeedFactor;
else if( evt->modifiers() & Qt::ControlModifier )
deltaD *= m_CtrlSpeedFactor;
if( distToFocusPoint() + deltaD > 0.0 )
setDistToFocusPoint( distToFocusPoint() + deltaD );
if( distToFocusPoint() + deltaD > 0.0 )
setDistToFocusPoint( distToFocusPoint() + deltaD );
}
}
else
{
......
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