]> git.mxchange.org Git - flightgear.git/commitdiff
CanvasWidget: automatically set auto-viewport.
authorThomas Geymayer <tomgey@gmail.com>
Mon, 25 Feb 2013 14:39:30 +0000 (15:39 +0100)
committerThomas Geymayer <tomgey@gmail.com>
Mon, 25 Feb 2013 14:39:30 +0000 (15:39 +0100)
If no viewport dimensions are given the viewport
will now automatically resize, otherwise it stays
unchanged.

src/GUI/CanvasWidget.cxx

index 3c99f90910d0f469e4d170d5aacf42e89ebd67cd..7113bef426f04d5a76905a12057a261ae8acae4f 100644 (file)
@@ -30,7 +30,8 @@ CanvasWidget::CanvasWidget( int x, int y,
   _canvas_mgr( dynamic_cast<CanvasMgr*>(globals->get_subsystem("Canvas")) ),
   _last_x(0),
   _last_y(0),
-  _auto_viewport( props->getBoolValue("auto-viewport", true) )
+  // automatically resize viewport of canvas if no size is given
+  _auto_viewport( !props->hasChild("view") )
 {
   if( !_canvas_mgr )
   {