mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-10 21:40:15 +00:00
Move the destruction of global resources, being used by multiple documents, to the editor.
This commit is contained in:
parent
44b11163d1
commit
64e1594b41
@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
#include "editor.hpp"
|
#include "editor.hpp"
|
||||||
|
|
||||||
|
#include <openengine/bullet/BulletShapeLoader.h>
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QLocalServer>
|
#include <QLocalServer>
|
||||||
#include <QLocalSocket>
|
#include <QLocalSocket>
|
||||||
@ -69,7 +71,10 @@ CS::Editor::Editor (OgreInit::OgreInit& ogreInit)
|
|||||||
}
|
}
|
||||||
|
|
||||||
CS::Editor::~Editor ()
|
CS::Editor::~Editor ()
|
||||||
{}
|
{
|
||||||
|
// cleanup global resources used by OEngine
|
||||||
|
delete OEngine::Physic::BulletShapeManager::getSingletonPtr();
|
||||||
|
}
|
||||||
|
|
||||||
void CS::Editor::setupDataFiles (const Files::PathContainer& dataDirs)
|
void CS::Editor::setupDataFiles (const Files::PathContainer& dataDirs)
|
||||||
{
|
{
|
||||||
|
@ -6,8 +6,6 @@
|
|||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QDesktopWidget>
|
#include <QDesktopWidget>
|
||||||
|
|
||||||
#include <openengine/bullet/BulletShapeLoader.h>
|
|
||||||
|
|
||||||
#include "../../model/doc/documentmanager.hpp"
|
#include "../../model/doc/documentmanager.hpp"
|
||||||
#include "../../model/doc/document.hpp"
|
#include "../../model/doc/document.hpp"
|
||||||
#include "../../model/world/columns.hpp"
|
#include "../../model/world/columns.hpp"
|
||||||
@ -220,8 +218,6 @@ void CSVDoc::ViewManager::removeDocAndView (CSMDoc::Document *document)
|
|||||||
mDocumentManager.removeDocument(document);
|
mDocumentManager.removeDocument(document);
|
||||||
(*iter)->deleteLater();
|
(*iter)->deleteLater();
|
||||||
mViews.erase (iter);
|
mViews.erase (iter);
|
||||||
// cleanup global resources used by OEngine
|
|
||||||
delete OEngine::Physic::BulletShapeManager::getSingletonPtr();
|
|
||||||
|
|
||||||
updateIndices();
|
updateIndices();
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user