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:
parent
045fc5b4ae
commit
3ea69785d9
1 changed files with 2 additions and 1 deletions
|
@ -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 )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue