forked from mirror/openmw-tes3mp
Fix loading moved references.
This commit is contained in:
parent
33a8cd245a
commit
49884f54f7
3 changed files with 9 additions and 4 deletions
|
@ -458,6 +458,8 @@ CSMWorld::Data::Data (ToUTF8::FromType encoding, const ResourcesManager& resourc
|
|||
UniversalId::Type_Texture);
|
||||
addModel (new ResourceTable (&mResourcesManager.get (UniversalId::Type_Videos)),
|
||||
UniversalId::Type_Video);
|
||||
|
||||
mRefLoadCache.clear(); // clear here rather than startLoading() and continueLoading() for multiple content files
|
||||
}
|
||||
|
||||
CSMWorld::Data::~Data()
|
||||
|
@ -779,7 +781,6 @@ int CSMWorld::Data::startLoading (const boost::filesystem::path& path, bool base
|
|||
mReader = 0;
|
||||
|
||||
mDialogue = 0;
|
||||
mRefLoadCache.clear();
|
||||
|
||||
mReader = new ESM::ESMReader;
|
||||
mReader->setEncoder (&mEncoder);
|
||||
|
@ -816,7 +817,6 @@ bool CSMWorld::Data::continueLoading (CSMDoc::Messages& messages)
|
|||
mReader = 0;
|
||||
|
||||
mDialogue = 0;
|
||||
mRefLoadCache.clear();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -84,7 +84,13 @@ void CSMWorld::RefCollection::load (ESM::ESMReader& reader, int cellIndex, bool
|
|||
else
|
||||
ref.mCell = cell2.mId;
|
||||
|
||||
std::map<ESM::RefNum, std::string>::iterator iter = cache.find (ref.mRefNum);
|
||||
// ignore content file number
|
||||
std::map<ESM::RefNum, std::string>::iterator iter = cache.begin();
|
||||
for (; iter != cache.end(); ++iter)
|
||||
{
|
||||
if (ref.mRefNum.mIndex == iter->first.mIndex)
|
||||
break;
|
||||
}
|
||||
|
||||
if (deleted)
|
||||
{
|
||||
|
|
|
@ -125,7 +125,6 @@ void CSVWorld::CommandDelegate::setModelDataImp (QWidget *editor, QAbstractItemM
|
|||
QVariant new_ = hack.getData();
|
||||
|
||||
if ((model->data (index)!=new_) && (model->flags(index) & Qt::ItemIsEditable))
|
||||
//getUndoStack().push (new CSMWorld::ModifyCommand (*model, index, new_)); // FIXME
|
||||
mCommandDispatcher->executeModify (model, index, new_);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue