]> git.mxchange.org Git - flightgear.git/commitdiff
Canvas GUI: preserve window size on reinit
authorThomas Geymayer <tomgey@gmail.com>
Fri, 21 Jun 2013 15:42:16 +0000 (17:42 +0200)
committerThomas Geymayer <tomgey@gmail.com>
Fri, 21 Jun 2013 15:42:16 +0000 (17:42 +0200)
src/Canvas/gui_mgr.cxx

index de9cf2d0b056bc02b267c0e53ffcdd4b735f6bb6..d55ff3a653ebb3fd938148eb7c57beb217aa3437 100644 (file)
@@ -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);