From 57b337d36874490c7ca064ac5a9cc622e5211795 Mon Sep 17 00:00:00 2001 From: cc9cii Date: Tue, 14 Oct 2014 11:43:56 +1100 Subject: [PATCH] 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. --- apps/opencs/view/render/overlaymask.cpp | 2 +- apps/opencs/view/render/pagedworldspacewidget.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/opencs/view/render/overlaymask.cpp b/apps/opencs/view/render/overlaymask.cpp index 885beeff4..09f020354 100644 --- a/apps/opencs/view/render/overlaymask.cpp +++ b/apps/opencs/view/render/overlaymask.cpp @@ -37,7 +37,7 @@ void OverlayMask::preViewportUpdate(const Ogre::RenderTargetViewportEvent &event it.hasMoreElements();) { Ogre::OverlayContainer* container = it.getNext(); - container->hide(); + if(container) container->hide(); } } diff --git a/apps/opencs/view/render/pagedworldspacewidget.cpp b/apps/opencs/view/render/pagedworldspacewidget.cpp index 83694bff6..26781bfd9 100644 --- a/apps/opencs/view/render/pagedworldspacewidget.cpp +++ b/apps/opencs/view/render/pagedworldspacewidget.cpp @@ -136,7 +136,7 @@ bool CSVRender::PagedWorldspaceWidget::adjustCells() height); manual-> position(ESM::Land::REAL_SIZE * iter->getX() + 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->setBoundingBox(Ogre::AxisAlignedBox( ESM::Land::REAL_SIZE * iter->getX() + ESM::Land::REAL_SIZE/2, @@ -144,7 +144,7 @@ bool CSVRender::PagedWorldspaceWidget::adjustCells() height, ESM::Land::REAL_SIZE * iter->getX() + 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); manual->setVisible(false);