Moved responsiblity for checking current event focus onto Widget::handleImplementations().
Added support for closing CombinBox popup when the mouse is clicked outside the popup or combobox widget. git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14396 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
@@ -212,20 +212,17 @@ void Widget::traverseImplementation(osg::NodeVisitor& nv)
|
||||
|
||||
// OSG_NOTICE<<"EventTraversal getHasEventFocus()="<<getHasEventFocus()<<std::endl;
|
||||
|
||||
if (getHasEventFocus())
|
||||
{
|
||||
// signify that event has been taken by widget with focus
|
||||
ev->setEventHandled(true);
|
||||
// signify that event has been taken by widget with focus
|
||||
|
||||
osgGA::EventQueue::Events& events = ev->getEvents();
|
||||
for(osgGA::EventQueue::Events::iterator itr = events.begin();
|
||||
itr != events.end();
|
||||
++itr)
|
||||
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()))
|
||||
{
|
||||
(*itr)->setHandled(true);
|
||||
}
|
||||
(*itr)->setHandled(true);
|
||||
ev->setEventHandled(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user