Commit 61a3e30c authored by Jan Möbius's avatar Jan Möbius

Fixed double click fly to not working when rotation is locked

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@12360 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 2a562a9f
......@@ -1587,8 +1587,7 @@ void glViewer::handleFirstPersonNavigation( QMouseEvent* _event) {
}
case QEvent::MouseButtonDblClick: {
if (allowRotation_)
flyTo(_event->pos(), _event->button() == Qt::MidButton);
flyTo(_event->pos(), _event->button() == Qt::MidButton);
break;
}
......@@ -1673,8 +1672,7 @@ void glViewer::handleNormalNavigation( QMouseEvent* _event ) {
}
case QEvent::MouseButtonDblClick: {
if (allowRotation_)
flyTo(_event->pos(), _event->button() == Qt::MidButton);
flyTo(_event->pos(), _event->button() == Qt::MidButton);
break;
}
......
......@@ -179,9 +179,10 @@ void glViewer::flyAnimationPerspective(QVariant _pos) {
translate(t);
// Only rotate, if we have realistic values
if (fabs(a) > FLT_MIN)
rotate(flyAxis_, a, flyCenter_);
// Only rotate, if we have realistic values and if rotation is allowed
if ( allowRotation_ )
if (fabs(a) > FLT_MIN)
rotate(flyAxis_, a, flyCenter_);
// Pick cache is definitely invalid after that
updatePickCache_ = true;
......
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