Changed the osgUI behaviour so that events are set to be handled by Widgets that have focus even if they don't directly use them.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14425 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
@@ -214,12 +214,14 @@ void Widget::traverseImplementation(osg::NodeVisitor& nv)
|
||||
|
||||
// signify that event has been taken by widget with focus
|
||||
|
||||
bool widgetsWithFocusSetHandled = getHasEventFocus();
|
||||
|
||||
osgGA::EventQueue::Events& events = ev->getEvents();
|
||||
for(osgGA::EventQueue::Events::iterator itr = events.begin();
|
||||
itr != events.end();
|
||||
++itr)
|
||||
{
|
||||
if (handle(ev, itr->get()))
|
||||
if (handle(ev, itr->get()) || widgetsWithFocusSetHandled)
|
||||
{
|
||||
(*itr)->setHandled(true);
|
||||
ev->setEventHandled(true);
|
||||
|
||||
Reference in New Issue
Block a user