From 3ea69785d92acce3a50df32a6e326a69f299adac Mon Sep 17 00:00:00 2001 From: Thomas Geymayer Date: Mon, 25 Feb 2013 15:39:30 +0100 Subject: [PATCH] CanvasWidget: automatically set auto-viewport. If no viewport dimensions are given the viewport will now automatically resize, otherwise it stays unchanged. --- src/GUI/CanvasWidget.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/GUI/CanvasWidget.cxx b/src/GUI/CanvasWidget.cxx index 3c99f9091..7113bef42 100644 --- a/src/GUI/CanvasWidget.cxx +++ b/src/GUI/CanvasWidget.cxx @@ -30,7 +30,8 @@ CanvasWidget::CanvasWidget( int x, int y, _canvas_mgr( dynamic_cast(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 ) { -- 2.39.5