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:
parent
fcb94de7ed
commit
0891e011dc
@ -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):
|
||||
{
|
||||
|
@ -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):
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user