1
0
Fork 0

Fix canvas gui size sometimes not initialized correct

This commit is contained in:
Thomas Geymayer 2013-01-01 13:45:45 +01:00
parent 4277ca6540
commit 0a879d3c65

View file

@ -131,9 +131,6 @@ GUIMgr::GUIMgr():
assert(camera);
camera->addChild(_transform);
osg::Viewport* vp = camera->getViewport();
handleResize(vp->x(), vp->y(), vp->width(), vp->height());
simgear::canvas::Canvas::addPlacementFactory
(
"window",
@ -159,6 +156,14 @@ GUIMgr::GUIMgr():
//------------------------------------------------------------------------------
void GUIMgr::init()
{
handleResize
(
0,
0,
fgGetInt("/sim/startup/xsize"),
fgGetInt("/sim/startup/ysize")
);
PropertyBasedMgr::init();
globals->get_renderer()