mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-19 17:39:44 +00:00
more cleanup of document setup
This commit is contained in:
parent
8dc6ad5059
commit
ab94e70724
1 changed files with 13 additions and 12 deletions
|
@ -2245,6 +2245,18 @@ CSMDoc::Document::Document (const Files::ConfigurationManager& configuration,
|
|||
}
|
||||
}
|
||||
|
||||
if (mNew)
|
||||
{
|
||||
mData.setDescription ("");
|
||||
mData.setAuthor ("");
|
||||
|
||||
if (mContentFiles.size()==1)
|
||||
createBase();
|
||||
}
|
||||
|
||||
addOptionalGmsts();
|
||||
addOptionalGlobals();
|
||||
|
||||
connect (&mUndoStack, SIGNAL (cleanChanged (bool)), this, SLOT (modificationStateChanged (bool)));
|
||||
|
||||
connect (&mTools, SIGNAL (progress (int, int, int)), this, SLOT (progress (int, int, int)));
|
||||
|
@ -2262,9 +2274,7 @@ CSMDoc::Document::~Document()
|
|||
|
||||
void CSMDoc::Document::setupData()
|
||||
{
|
||||
if (mNew && mContentFiles.size()==1)
|
||||
createBase();
|
||||
else
|
||||
if (!mNew || mContentFiles.size()>1)
|
||||
{
|
||||
std::vector<boost::filesystem::path>::const_iterator end = mContentFiles.end();
|
||||
|
||||
|
@ -2274,16 +2284,7 @@ void CSMDoc::Document::setupData()
|
|||
load (mContentFiles.begin(), end, !mNew);
|
||||
}
|
||||
|
||||
if (mNew)
|
||||
{
|
||||
mData.setDescription ("");
|
||||
mData.setAuthor ("");
|
||||
}
|
||||
|
||||
getData().loadFile (mProjectPath, false, true);
|
||||
|
||||
addOptionalGmsts();
|
||||
addOptionalGlobals();
|
||||
}
|
||||
|
||||
QUndoStack& CSMDoc::Document::getUndoStack()
|
||||
|
|
Loading…
Reference in a new issue