From: Thomas Geymayer Date: Fri, 21 Jun 2013 15:42:16 +0000 (+0200) Subject: Canvas GUI: preserve window size on reinit X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9e2625d57523f388bb745fa93c372ebc403f4023;p=flightgear.git Canvas GUI: preserve window size on reinit --- diff --git a/src/Canvas/gui_mgr.cxx b/src/Canvas/gui_mgr.cxx index de9cf2d0b..d55ff3a65 100644 --- a/src/Canvas/gui_mgr.cxx +++ b/src/Canvas/gui_mgr.cxx @@ -114,6 +114,10 @@ GUIMgr::GUIMgr(): _width = _height = -1; + // Do not change values on reinit + _width.node()->setAttribute(SGPropertyNode::PRESERVE, true); + _height.node()->setAttribute(SGPropertyNode::PRESERVE, true); + osg::Camera* camera = flightgear::getGUICamera( flightgear::CameraGroup::getDefault() ); assert(camera);