mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-01 11:15:36 +00:00
file loading fixes
This commit is contained in:
parent
9145fb210b
commit
a994a23f4e
1 changed files with 7 additions and 6 deletions
|
@ -18,9 +18,6 @@ void CSMDoc::Document::load (const std::vector<boost::filesystem::path>::const_i
|
|||
|
||||
if (lastAsModified)
|
||||
getData().loadFile (*end2, false);
|
||||
|
||||
addOptionalGmsts();
|
||||
addOptionalGlobals();
|
||||
}
|
||||
|
||||
void CSMDoc::Document::addOptionalGmsts()
|
||||
|
@ -199,6 +196,8 @@ void CSMDoc::Document::createBase()
|
|||
|
||||
getData().getGlobals().add (record);
|
||||
}
|
||||
|
||||
/// \todo add GMSTs
|
||||
}
|
||||
|
||||
CSMDoc::Document::Document (const std::vector<boost::filesystem::path>& files, bool new_)
|
||||
|
@ -213,7 +212,9 @@ CSMDoc::Document::Document (const std::vector<boost::filesystem::path>& files, b
|
|||
|
||||
mName = files.back().filename().string();
|
||||
|
||||
if (files.size()>1 || !new_)
|
||||
if (new_ && files.size()==1)
|
||||
createBase();
|
||||
else if (files.size()>1)
|
||||
{
|
||||
std::vector<boost::filesystem::path>::const_iterator end = files.end();
|
||||
|
||||
|
@ -223,8 +224,8 @@ CSMDoc::Document::Document (const std::vector<boost::filesystem::path>& files, b
|
|||
load (files.begin(), end, !new_);
|
||||
}
|
||||
|
||||
if (new_ && files.size()==1)
|
||||
createBase();
|
||||
addOptionalGmsts();
|
||||
addOptionalGlobals();
|
||||
|
||||
connect (&mUndoStack, SIGNAL (cleanChanged (bool)), this, SLOT (modificationStateChanged (bool)));
|
||||
|
||||
|
|
Loading…
Reference in a new issue