From Mathieu Marache, "we found that events where not caught when running in ON_DEMAND frame scheme : GraphicsWindow::checkEvents() always return false and GraphicsWindowQt doesn't overload it.

here is a simple fix that will return if the list is empty or not and will match the comment in checkEvents()
This commit is contained in:
Robert Osfield
2013-07-19 06:20:46 +00:00
parent 5255884fec
commit 0175c820af
2 changed files with 1 additions and 2 deletions

View File

@@ -55,7 +55,6 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
STANDARD_SETTINGS = HEADLIGHT |
COMPILE_GLOBJECTS_AT_INIT |
APPLY_GLOBAL_DEFAULTS |
APPLY_GLOBAL_DEFAULTS |
CLEAR_GLOBAL_STATESET
};

View File

@@ -54,7 +54,7 @@ class OSGVIEWER_EXPORT GraphicsWindow : public osg::GraphicsContext, public osgG
const osgGA::EventQueue* getEventQueue() const { return _eventQueue.get(); }
/** Check events, return true if events have been received.*/
virtual bool checkEvents() { return false; }
virtual bool checkEvents() { return !(_eventQueue->empty()); }
/** Set the window's position and size.*/
void setWindowRectangle(int x, int y, int width, int height)