mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-12 13:13:27 +00:00
Integrate the Id completion manager into the Document class
This commit is contained in:
parent
87a1f9f9aa
commit
19cc6b83e5
@ -2257,7 +2257,8 @@ CSMDoc::Document::Document (const Files::ConfigurationManager& configuration,
|
||||
mSavingOperation (*this, mProjectPath, encoding),
|
||||
mSaving (&mSavingOperation),
|
||||
mResDir(resDir),
|
||||
mRunner (mProjectPath), mPhysics(boost::shared_ptr<CSVWorld::PhysicsSystem>())
|
||||
mRunner (mProjectPath), mPhysics(boost::shared_ptr<CSVWorld::PhysicsSystem>()),
|
||||
mIdCompletionManager(mData)
|
||||
{
|
||||
if (mContentFiles.empty())
|
||||
throw std::runtime_error ("Empty content file sequence");
|
||||
@ -2488,3 +2489,8 @@ boost::shared_ptr<CSVWorld::PhysicsSystem> CSMDoc::Document::getPhysics ()
|
||||
|
||||
return mPhysics;
|
||||
}
|
||||
|
||||
CSMWorld::IdCompletionManager &CSMDoc::Document::getIdCompletionManager()
|
||||
{
|
||||
return mIdCompletionManager;
|
||||
}
|
@ -13,6 +13,7 @@
|
||||
#include <components/to_utf8/to_utf8.hpp>
|
||||
|
||||
#include "../world/data.hpp"
|
||||
#include "../world/idcompletionmanager.hpp"
|
||||
|
||||
#include "../tools/tools.hpp"
|
||||
|
||||
@ -66,6 +67,7 @@ namespace CSMDoc
|
||||
Blacklist mBlacklist;
|
||||
Runner mRunner;
|
||||
boost::shared_ptr<CSVWorld::PhysicsSystem> mPhysics;
|
||||
CSMWorld::IdCompletionManager mIdCompletionManager;
|
||||
|
||||
// It is important that the undo stack is declared last, because on desctruction it fires a signal, that is connected to a slot, that is
|
||||
// using other member variables. Unfortunately this connection is cut only in the QObject destructor, which is way too late.
|
||||
@ -144,6 +146,8 @@ namespace CSMDoc
|
||||
|
||||
boost::shared_ptr<CSVWorld::PhysicsSystem> getPhysics();
|
||||
|
||||
CSMWorld::IdCompletionManager &getIdCompletionManager();
|
||||
|
||||
signals:
|
||||
|
||||
void stateChanged (int state, CSMDoc::Document *document);
|
||||
|
Loading…
x
Reference in New Issue
Block a user