From 255432f76b92f71c7e74451c089f20610877007f Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 21 May 2013 09:48:16 +0000 Subject: [PATCH] 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." --- src/osgManipulator/Dragger.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/osgManipulator/Dragger.cpp b/src/osgManipulator/Dragger.cpp index a693f7a4e..a397159ba 100644 --- a/src/osgManipulator/Dragger.cpp +++ b/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; }