Show
Ignore:
Timestamp:
11/19/09 18:22:20 (4 years ago)
Author:
robert
Message:

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.
"

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgViewer/Viewer.cpp

    r10601 r10792  
    656656                    case(osgGA::GUIEventAdapter::PUSH): 
    657657                    case(osgGA::GUIEventAdapter::RELEASE): 
     658                    case(osgGA::GUIEventAdapter::DOUBLECLICK): 
    658659                    case(osgGA::GUIEventAdapter::DRAG): 
    659660                    case(osgGA::GUIEventAdapter::MOVE):