From Vincent Gadoury, "In osgViewer::Viewer and osgViewer::CompositveViewer, the DOUBLECLICK event type was not considered as a "pointer event" and thus was receiving the event state coordinates and button mask. As a result, a double-click event always had a button mask not including the double-clicked button, even if double-click event is a "button push" event.

The modification consists only in including osgGA::GUIEventAdapter::DOUBLECLICK in the list of "pointerEvent" events.

Test done to reproduce the problem and check the fix: in any osg application or example with an HandleInput function, break on events with a double-click event type. Without the changes, the event's buttonMask does not contain the double-clicked button. With the changes, it does.

Only simple tests (running some examples and playing with the mouse) were done to check that the changes do not break anything, since double-click is not used thoroughly in OSG.

Modification done against current SVN Trunk version (r10753).

As this is a fix, I do not wish to keep my copyright on this submission and assign it over to the project lead.
"
This commit is contained in:
Robert Osfield 2009-11-19 17:22:20 +00:00
parent fcb94de7ed
commit 0891e011dc
2 changed files with 2 additions and 0 deletions

View File

@ -739,6 +739,7 @@ void CompositeViewer::eventTraversal()
break;
case(osgGA::GUIEventAdapter::PUSH):
case(osgGA::GUIEventAdapter::RELEASE):
case(osgGA::GUIEventAdapter::DOUBLECLICK):
case(osgGA::GUIEventAdapter::DRAG):
case(osgGA::GUIEventAdapter::MOVE):
{

View File

@ -655,6 +655,7 @@ void Viewer::eventTraversal()
{
case(osgGA::GUIEventAdapter::PUSH):
case(osgGA::GUIEventAdapter::RELEASE):
case(osgGA::GUIEventAdapter::DOUBLECLICK):
case(osgGA::GUIEventAdapter::DRAG):
case(osgGA::GUIEventAdapter::MOVE):
{