Added checking of GUIEventAdpter::getHandled().

This commit is contained in:
Robert Osfield
2007-07-03 13:26:48 +00:00
parent dd628a9829
commit 7f0b3144ea
6 changed files with 45 additions and 28 deletions

View File

@@ -162,7 +162,9 @@ bool KeySwitchMatrixManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapt
{
if (!_current) return false;
if(ea.getEventType()==GUIEventAdapter::KEYDOWN)
bool handled = false;
if (!ea.getHandled() && ea.getEventType()==GUIEventAdapter::KEYDOWN)
{
KeyManipMap::iterator it=_manips.find(ea.getKey());
@@ -178,11 +180,12 @@ bool KeySwitchMatrixManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapt
_current = it->second.second;
//_cameraManipChangeCallbacks.notify(this);
handled = true;
}
}
return _current->handle(ea,aa);
return _current->handle(ea,aa) || handled;
}
void KeySwitchMatrixManipulator::getUsage(osg::ApplicationUsage& usage) const