Hi,
I use osgViewer::CompositeViewer with several views. All views share
parts of their scene graphs. Within these common part some nodes have
event handlers which use the action adapter argument to the event
handler to determinate which view received the event.
Here is the problem, osgViewer::CompositeViewer::eventTraversal sets
the action adapter field in the EventVisitor always to the last view
which received an event, instead of using the view which actually
received the event, so determination of the correct view does not work.
I looked at the code a bit, and moved the code for setting the action
adapter to a IMO better place.
btw, on every mouse move all views seem to receive FRAME events, is
that normal or is it some glitch within my application?
thanks in advance, thomas
--- OpenSceneGraph-2.6.1/src/osgViewer/CompositeViewer.cpp 2008-07-21 23:00:57.000000000 +0200
+++ OpenSceneGraph-2.6.1.patched/src/osgViewer/CompositeViewer.cpp 2008-10-30 14:51:45.160100471 +0100
@@ -865,7 +865,6 @@
++veitr)
{
View* view = veitr->first;
- _eventVisitor->setActionAdapter(view);
for(osgGA::EventQueue::Events::iterator itr = veitr->second.begin();
itr != veitr->second.end();
@@ -897,6 +896,8 @@
++veitr)
{
View* view = veitr->first;
+ _eventVisitor->setActionAdapter( view );
+
if (view->getSceneData())
{
for(osgGA::EventQueue::Events::iterator itr = veitr->second.begin();
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org