More cleanup.

loadfix
cc9cii 10 years ago
parent c2c33eac0f
commit 6c8320a638

@ -297,7 +297,7 @@ void CSVRender::PagedWorldspaceWidget::mouseDoubleClickEvent (QMouseEvent *event
// 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
// subviews are to be supported.
//CSVWorld::PhysicsSystem::instance()->setSceneManager(getSceneManager());
CSVWorld::PhysicsSystem::instance()->setSceneManager(getSceneManager());
CSVWorld::PhysicsSystem::instance()->toggleDebugRendering();
flagAsModified();
}
@ -444,11 +444,16 @@ CSVRender::PagedWorldspaceWidget::~PagedWorldspaceWidget()
for(;iter != mSelectedEntities.end(); ++iter)
{
removeHitPoint(getSceneManager(), iter->first);
Ogre::SceneNode *scene = getSceneManager()->getSceneNode(iter->first);
if(scene)
if(getSceneManager()->hasSceneNode(iter->first))
{
scene->removeAndDestroyAllChildren();
getSceneManager()->destroySceneNode(iter->first);
Ogre::SceneNode *scene = getSceneManager()->getSceneNode(iter->first);
if(scene)
{
scene->removeAndDestroyAllChildren();
getSceneManager()->destroySceneNode(iter->first);
}
}
}
}

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

Loading…
Cancel
Save