Added check against whether an event has been handled or not before actioning escape/quit.
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user