mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-29 17:06:43 +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)
|
if (lastAsModified)
|
||||||
getData().loadFile (*end2, false);
|
getData().loadFile (*end2, false);
|
||||||
|
|
||||||
addOptionalGmsts();
|
|
||||||
addOptionalGlobals();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSMDoc::Document::addOptionalGmsts()
|
void CSMDoc::Document::addOptionalGmsts()
|
||||||
|
@ -199,6 +196,8 @@ void CSMDoc::Document::createBase()
|
||||||
|
|
||||||
getData().getGlobals().add (record);
|
getData().getGlobals().add (record);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// \todo add GMSTs
|
||||||
}
|
}
|
||||||
|
|
||||||
CSMDoc::Document::Document (const std::vector<boost::filesystem::path>& files, bool new_)
|
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();
|
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();
|
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_);
|
load (files.begin(), end, !new_);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (new_ && files.size()==1)
|
addOptionalGmsts();
|
||||||
createBase();
|
addOptionalGlobals();
|
||||||
|
|
||||||
connect (&mUndoStack, SIGNAL (cleanChanged (bool)), this, SLOT (modificationStateChanged (bool)));
|
connect (&mUndoStack, SIGNAL (cleanChanged (bool)), this, SLOT (modificationStateChanged (bool)));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue