1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-03-29 19:36:43 +00:00

More cleanup.

This commit is contained in:
cc9cii 2014-10-27 12:09:20 +11:00
parent c2c33eac0f
commit 6c8320a638
2 changed files with 10 additions and 6 deletions

View file

@ -297,7 +297,7 @@ void CSVRender::PagedWorldspaceWidget::mouseDoubleClickEvent (QMouseEvent *event
// debug drawer. Hence only the first subview that creates the debug drawer // debug drawer. Hence only the first subview that creates the debug drawer
// can view the debug lines. Will need to keep a map in OEngine if multiple // can view the debug lines. Will need to keep a map in OEngine if multiple
// subviews are to be supported. // subviews are to be supported.
//CSVWorld::PhysicsSystem::instance()->setSceneManager(getSceneManager()); CSVWorld::PhysicsSystem::instance()->setSceneManager(getSceneManager());
CSVWorld::PhysicsSystem::instance()->toggleDebugRendering(); CSVWorld::PhysicsSystem::instance()->toggleDebugRendering();
flagAsModified(); flagAsModified();
} }
@ -444,11 +444,16 @@ CSVRender::PagedWorldspaceWidget::~PagedWorldspaceWidget()
for(;iter != mSelectedEntities.end(); ++iter) for(;iter != mSelectedEntities.end(); ++iter)
{ {
removeHitPoint(getSceneManager(), iter->first); removeHitPoint(getSceneManager(), iter->first);
Ogre::SceneNode *scene = getSceneManager()->getSceneNode(iter->first);
if(scene) if(getSceneManager()->hasSceneNode(iter->first))
{ {
scene->removeAndDestroyAllChildren(); Ogre::SceneNode *scene = getSceneManager()->getSceneNode(iter->first);
getSceneManager()->destroySceneNode(iter->first);
if(scene)
{
scene->removeAndDestroyAllChildren();
getSceneManager()->destroySceneNode(iter->first);
}
} }
} }
} }

View file

@ -61,7 +61,6 @@ namespace CSVWorld
private: private:
void initDebug();
void updateSelectionHighlight(std::string sceneNode, const Ogre::Vector3 &position); void updateSelectionHighlight(std::string sceneNode, const Ogre::Vector3 &position);
}; };
} }