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

Navigation using the numerical keypad improved.

parent 9c409646
......@@ -2072,6 +2072,8 @@ void GLViewer::keyPressEvent( QKeyEvent *evt )
case Qt::Key_1:
{
QMatrix4x4 rot;
if( evt->modifiers() & Qt::CTRL )
rot.rotate( 180.0f, 0,1,0 );
setViewRotationMatrix( rot );
update();
break;
......@@ -2080,6 +2082,8 @@ void GLViewer::keyPressEvent( QKeyEvent *evt )
{
QMatrix4x4 rot;
rot.rotate( -90.0f, 0,1,0 );
if( evt->modifiers() & Qt::CTRL )
rot.rotate( 180.0f, 0,1,0 );
setViewRotationMatrix( rot );
update();
break;
......@@ -2088,6 +2092,8 @@ void GLViewer::keyPressEvent( QKeyEvent *evt )
{
QMatrix4x4 rot;
rot.rotate( 90.0f, 1,0,0 );
if( evt->modifiers() & Qt::CTRL )
rot.rotate( 180.0f, 1,0,0 );
setViewRotationMatrix( rot );
update();
break;
......
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