From Claus Scheiblauer, "in GraphicsWindowQt.cpp the GLWidget::keyReleaseEvent was implemented slightly different to the GLWidget::keyPressEvent, which caused the cursor keys values to be not correctly mapped from an QKeyEvent value to an osg key value when releasing a cursor key."

This commit is contained in:
Robert Osfield
2012-02-08 09:34:44 +00:00
parent 1432d4d54b
commit ce4890fa7a

View File

@@ -270,7 +270,8 @@ void GLWidget::keyPressEvent( QKeyEvent* event )
void GLWidget::keyReleaseEvent( QKeyEvent* event )
{
setKeyboardModifiers( event );
_gw->getEventQueue()->keyRelease( (osgGA::GUIEventAdapter::KeySymbol) *(event->text().toAscii().data()) );
int value = s_QtKeyboardMap.remapKey( event );
_gw->getEventQueue()->keyRelease( value );
// this passes the event to the regular Qt key event processing,
// among others, it closes popup windows on ESC and forwards the event to the parent widgets