mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-09 03:57:51 +03:00
load project files
This commit is contained in:
parent
62148b3247
commit
e7c48cbe58
3 changed files with 34 additions and 4 deletions
|
@ -1,6 +1,9 @@
|
|||
#include "document.hpp"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
void CSMDoc::Document::load (const std::vector<boost::filesystem::path>::const_iterator& begin,
|
||||
const std::vector<boost::filesystem::path>::const_iterator& end, bool lastAsModified)
|
||||
{
|
||||
|
@ -12,10 +15,10 @@ void CSMDoc::Document::load (const std::vector<boost::filesystem::path>::const_i
|
|||
--end2;
|
||||
|
||||
for (std::vector<boost::filesystem::path>::const_iterator iter (begin); iter!=end2; ++iter)
|
||||
getData().loadFile (*iter, true);
|
||||
getData().loadFile (*iter, true, false);
|
||||
|
||||
if (lastAsModified)
|
||||
getData().loadFile (*end2, false);
|
||||
getData().loadFile (*end2, false, false);
|
||||
}
|
||||
|
||||
void CSMDoc::Document::addGmsts()
|
||||
|
@ -2164,6 +2167,18 @@ CSMDoc::Document::Document (const std::vector<boost::filesystem::path>& files,
|
|||
mData.setDescription ("");
|
||||
mData.setAuthor ("");
|
||||
}
|
||||
/// \todo un-outcomment the else, once loading an existing content file works properly again.
|
||||
// else
|
||||
{
|
||||
if (boost::filesystem::exists (projectPath))
|
||||
{
|
||||
getData().loadFile (projectPath, false, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
/// \todo create new project file with default filters
|
||||
}
|
||||
}
|
||||
|
||||
addOptionalGmsts();
|
||||
addOptionalGlobals();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue