Fix corruption issue when the initial scenewidget is closed before subsequent ones. Also place the label closer to the terrain height at the center of the cell, should reduce the perception of the label jumping around too much.

loadfix
cc9cii 10 years ago
parent 961867e39f
commit 57b337d368

@ -37,7 +37,7 @@ void OverlayMask::preViewportUpdate(const Ogre::RenderTargetViewportEvent &event
it.hasMoreElements();) it.hasMoreElements();)
{ {
Ogre::OverlayContainer* container = it.getNext(); Ogre::OverlayContainer* container = it.getNext();
container->hide(); if(container) container->hide();
} }
} }

@ -136,7 +136,7 @@ bool CSVRender::PagedWorldspaceWidget::adjustCells()
height); height);
manual-> position(ESM::Land::REAL_SIZE * iter->getX() + ESM::Land::REAL_SIZE/2, manual-> position(ESM::Land::REAL_SIZE * iter->getX() + ESM::Land::REAL_SIZE/2,
ESM::Land::REAL_SIZE * iter->getY() + ESM::Land::REAL_SIZE/2, ESM::Land::REAL_SIZE * iter->getY() + ESM::Land::REAL_SIZE/2,
height+2000); // FIXME: config setting height+20); // FIXME: config setting
manual->end(); manual->end();
manual->setBoundingBox(Ogre::AxisAlignedBox( manual->setBoundingBox(Ogre::AxisAlignedBox(
ESM::Land::REAL_SIZE * iter->getX() + ESM::Land::REAL_SIZE/2, ESM::Land::REAL_SIZE * iter->getX() + ESM::Land::REAL_SIZE/2,
@ -144,7 +144,7 @@ bool CSVRender::PagedWorldspaceWidget::adjustCells()
height, height,
ESM::Land::REAL_SIZE * iter->getX() + ESM::Land::REAL_SIZE/2, ESM::Land::REAL_SIZE * iter->getX() + ESM::Land::REAL_SIZE/2,
ESM::Land::REAL_SIZE * iter->getY() + ESM::Land::REAL_SIZE/2, ESM::Land::REAL_SIZE * iter->getY() + ESM::Land::REAL_SIZE/2,
height+2000)); height+20));
getSceneManager()->getRootSceneNode()->createChildSceneNode()->attachObject(manual); getSceneManager()->getRootSceneNode()->createChildSceneNode()->attachObject(manual);
manual->setVisible(false); manual->setVisible(false);

Loading…
Cancel
Save