forked from teamnwah/openmw-tes3coop
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 (&mUndoStack, SIGNAL (cleanChanged (bool)), this, SLOT (modificationStateChanged (bool)));
|
||||||
|
|
||||||
connect (&mTools, SIGNAL (progress (int, int, int)), this, SLOT (progress (int, int, int)));
|
connect (&mTools, SIGNAL (progress (int, int, int)), this, SLOT (progress (int, int, int)));
|
||||||
|
@ -2262,9 +2274,7 @@ CSMDoc::Document::~Document()
|
||||||
|
|
||||||
void CSMDoc::Document::setupData()
|
void CSMDoc::Document::setupData()
|
||||||
{
|
{
|
||||||
if (mNew && mContentFiles.size()==1)
|
if (!mNew || mContentFiles.size()>1)
|
||||||
createBase();
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
std::vector<boost::filesystem::path>::const_iterator end = mContentFiles.end();
|
std::vector<boost::filesystem::path>::const_iterator end = mContentFiles.end();
|
||||||
|
|
||||||
|
@ -2274,16 +2284,7 @@ void CSMDoc::Document::setupData()
|
||||||
load (mContentFiles.begin(), end, !mNew);
|
load (mContentFiles.begin(), end, !mNew);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mNew)
|
|
||||||
{
|
|
||||||
mData.setDescription ("");
|
|
||||||
mData.setAuthor ("");
|
|
||||||
}
|
|
||||||
|
|
||||||
getData().loadFile (mProjectPath, false, true);
|
getData().loadFile (mProjectPath, false, true);
|
||||||
|
|
||||||
addOptionalGmsts();
|
|
||||||
addOptionalGlobals();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QUndoStack& CSMDoc::Document::getUndoStack()
|
QUndoStack& CSMDoc::Document::getUndoStack()
|
||||||
|
|
Loading…
Reference in a new issue