diff --git a/src/osgProducer/ViewerEventHandler.cpp b/src/osgProducer/ViewerEventHandler.cpp index 5b86f1ee0..98d49acf9 100644 --- a/src/osgProducer/ViewerEventHandler.cpp +++ b/src/osgProducer/ViewerEventHandler.cpp @@ -208,6 +208,10 @@ void ViewerEventHandler::StatsAndHelpDrawCallback::operator()( const Producer::C int x,y; unsigned int width,height; camera.getProjectionRectangle(x,y,width,height); + + // don't redraw if the new window size is 0 width or height. + if (width==0 || height==0) return; + _viewport->setViewport(x,y,width,height); OsgSceneHandler* osh = _veh->getOsgCameraGroup()->getSceneHandlerList()[_cameraNumber].get(); @@ -1258,13 +1262,6 @@ bool ViewerEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActio } -#ifdef COMPILE_COMPOSITE_EVENTHANDLER -void ViewerEventHandler::accept(osgGA::GUIEventHandlerVisitor& gehv) -{ - gehv.visit(*this); -} -#endif - void ViewerEventHandler::getUsage(osg::ApplicationUsage& usage) const { usage.addKeyboardMouseBinding("f","Toggle fullscreen");