From Alexander Sinditskiy, "I just noticed that Dragger allways handle events even when
handle(const PointerInfo&, const osgGA::GUIEventAdapter&, osgGA::GUIActionAdapter&) returns false.I think it is not correct...i think handled should be changed only when it is really handled."
This commit is contained in:
parent
9f66a10aa2
commit
255432f76b
@ -403,13 +403,15 @@ bool Dragger::handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter&
|
||||
_pointer.setCamera(rootCamera);
|
||||
_pointer.setMousePosition(ea.getX(), ea.getY());
|
||||
|
||||
dragger->handle(_pointer, ea, aa);
|
||||
if(dragger->handle(_pointer, ea, aa))
|
||||
{
|
||||
dragger->setDraggerActive(true);
|
||||
handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case osgGA::GUIEventAdapter::DRAG:
|
||||
@ -421,10 +423,11 @@ bool Dragger::handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter&
|
||||
// _pointer.setCamera(view->getCamera());
|
||||
_pointer.setMousePosition(ea.getX(), ea.getY());
|
||||
|
||||
handle(_pointer, ea, aa);
|
||||
|
||||
if(handle(_pointer, ea, aa))
|
||||
{
|
||||
handled = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user