Thanks Alexander, change looks appropriate now merged and submitted to
svn/trunk.

On 16 May 2013 13:41, Alexander Sinditskiy <[email protected]> wrote:
> Hi,
>
> 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.
>
> patch
>
> Code:
>
> diff --git a/src/osgManipulator/Dragger.cpp b/src/osgManipulator/Dragger.cpp
> index a693f7a..886d9b1 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;
>              }
>
>
>
>
> i think handled should be changed only when it is really handled.
>
> Thank you!
>
> Cheers,
> Alexander
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=54035#54035
>
>
>
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to