Added checking of EventVisitor type

This commit is contained in:
Robert Osfield 2005-09-05 13:26:50 +00:00
parent 48c83869c6
commit 4795fb88e6

View File

@ -659,9 +659,9 @@ class FollowMouseCallback : public osgGA::GUIEventHandler, public osg::StateSet:
virtual void operator() (osg::StateSet* stateset, osg::NodeVisitor* nv)
{
osgGA::EventVisitor* ev = dynamic_cast<osgGA::EventVisitor*>(nv);
if (nv->getVisitorType()==osg::NodeVisitor::EVENT_VISITOR || ev)
if (nv->getVisitorType()==osg::NodeVisitor::EVENT_VISITOR)
{
osgGA::EventVisitor* ev = dynamic_cast<osgGA::EventVisitor*>(nv);
if (ev)
{
osgGA::GUIActionAdapter* aa = ev->getActionAdapter();