1
0
Fork 0

CanvasWidget: automatically set auto-viewport.

If no viewport dimensions are given the viewport
will now automatically resize, otherwise it stays
unchanged.
This commit is contained in:
Thomas Geymayer 2013-02-25 15:39:30 +01:00
parent 045fc5b4ae
commit 3ea69785d9

View file

@ -30,7 +30,8 @@ CanvasWidget::CanvasWidget( int x, int y,
_canvas_mgr( dynamic_cast<CanvasMgr*>(globals->get_subsystem("Canvas")) ), _canvas_mgr( dynamic_cast<CanvasMgr*>(globals->get_subsystem("Canvas")) ),
_last_x(0), _last_x(0),
_last_y(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 ) if( !_canvas_mgr )
{ {