Fixed panning bug, when using RUN_ON_DEMAND, that resulted in the camera being thrown off towards infinity.
The solution for to refactor the way that events are checked so I add a bool return type to checkEvents() method across osgViewer::GraphcisWindow, osgGA::Devive and osgViewer::Viewer/CompositeViewer classes
This commit is contained in:
@@ -844,9 +844,9 @@ bool GraphicsWindowCarbon::handleModifierKeys(EventRef theEvent)
|
||||
|
||||
|
||||
|
||||
void GraphicsWindowCarbon::checkEvents()
|
||||
bool GraphicsWindowCarbon::checkEvents()
|
||||
{
|
||||
if (!_realized) return;
|
||||
if (!_realized) return false;
|
||||
|
||||
EventRef theEvent;
|
||||
EventTargetRef theTarget = GetEventDispatcherTarget();
|
||||
@@ -869,7 +869,7 @@ void GraphicsWindowCarbon::checkEvents()
|
||||
if ((fwres == inMenuBar) && (mouseButton >= 1)) {
|
||||
MenuSelect(wheresMyMouse);
|
||||
HiliteMenu(0);
|
||||
return;
|
||||
return !(getEventQueue()->empty());
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -903,6 +903,7 @@ void GraphicsWindowCarbon::checkEvents()
|
||||
s_quit_requested = false;
|
||||
}
|
||||
|
||||
return !(getEventQueue()->empty());
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user