From 9e2625d57523f388bb745fa93c372ebc403f4023 Mon Sep 17 00:00:00 2001 From: Thomas Geymayer Date: Fri, 21 Jun 2013 17:42:16 +0200 Subject: [PATCH] Canvas GUI: preserve window size on reinit --- src/Canvas/gui_mgr.cxx | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.39.5