Permalink
Browse files

From Alexander Sinditskiy, "I just noticed that Dragger allways handl…

…e 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."
  • Loading branch information...
1 parent 946c5ae commit 84b3b66090588d3fb59f3937781149e988313b62 @osg-training-guest osg-training-guest committed May 21, 2013
Showing with 9 additions and 6 deletions.
  1. +9 −6 src/osgManipulator/Dragger.cpp
@@ -403,9 +403,11 @@ bool Dragger::handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter&
_pointer.setCamera(rootCamera);
_pointer.setMousePosition(ea.getX(), ea.getY());
- dragger->handle(_pointer, ea, aa);
- dragger->setDraggerActive(true);
- handled = true;
+ if(dragger->handle(_pointer, ea, aa))
+ {
+ dragger->setDraggerActive(true);
+ handled = true;
+ }
}
}
}
@@ -421,9 +423,10 @@ bool Dragger::handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter&
// _pointer.setCamera(view->getCamera());
_pointer.setMousePosition(ea.getX(), ea.getY());
- handle(_pointer, ea, aa);
-
- handled = true;
+ if(handle(_pointer, ea, aa))
+ {
+ handled = true;
+ }
}
break;
}

0 comments on commit 84b3b66

Please sign in to comment.