Added check against whether an event has been handled or not before actioning escape/quit.

This commit is contained in:
Robert Osfield
2014-05-20 08:34:32 +00:00
parent 4ce2e075c4
commit e4004118db
2 changed files with 8 additions and 0 deletions

View File

@@ -1120,6 +1120,10 @@ void CompositeViewer::eventTraversal()
{
osgGA::GUIEventAdapter* event = (*itr)->asGUIEventAdapter();
if (!event) continue;
// ignore event if it's already been handled.
if (event->getHandled()) continue;
switch(event->getEventType())
{
case(osgGA::GUIEventAdapter::KEYUP):

View File

@@ -989,6 +989,10 @@ void Viewer::eventTraversal()
{
osgGA::GUIEventAdapter* event = (*itr)->asGUIEventAdapter();
if (!event) continue;
// ignore event if it's already been handled.
if (event->getHandled()) continue;
switch(event->getEventType())
{
case(osgGA::GUIEventAdapter::KEYUP):