fixed record state issues after merge

sceneinput
Marc Zinnschlag 9 years ago
parent f95950e8d8
commit 845cafd61c

@ -66,7 +66,7 @@ namespace CSMTools
const CSMWorld::Record<RecordType>& record = source.getRecord (stage);
if (!record.isDeleted())
target.appendRecord (CSMWorld::Record<RecordType> (CSMWorld::RecordBase::State_BaseOnly, &record.get()));
target.appendRecord (CSMWorld::Record<RecordType> (CSMWorld::RecordBase::State_ModifiedOnly, 0, &record.get()));
}

@ -2,6 +2,7 @@
#include "refiddata.hpp"
#include <cassert>
#include <memory>
#include <components/misc/stringops.hpp>
@ -345,7 +346,7 @@ const CSMWorld::RefIdDataContainer< ESM::Static >& CSMWorld::RefIdData::getStati
return mStatics;
}
void CSMWorld::RefIdData::insertRecord(CSMWorld::RecordBase& record, CSMWorld::UniversalId::Type type, const std::string& id)
void CSMWorld::RefIdData::insertRecord (CSMWorld::RecordBase& record, CSMWorld::UniversalId::Type type, const std::string& id)
{
std::map<UniversalId::Type, RefIdDataContainerBase *>::iterator iter =
mRecordContainers.find (type);
@ -367,5 +368,7 @@ void CSMWorld::RefIdData::copyTo (int index, RefIdData& target) const
std::string id = source->getId (localIndex.first);
target.insertRecord (source->getRecord (localIndex.first), localIndex.second, id);
std::auto_ptr<CSMWorld::RecordBase> newRecord (source->getRecord (localIndex.first).modifiedCopy());
target.insertRecord (*newRecord, localIndex.second, id);
}

@ -210,7 +210,8 @@ namespace CSMWorld
void erase (int index, int count);
void insertRecord(CSMWorld::RecordBase& record, CSMWorld::UniversalId::Type type, const std::string& id);
void insertRecord (CSMWorld::RecordBase& record, CSMWorld::UniversalId::Type type,
const std::string& id);
const RecordBase& getRecord (const LocalIndex& index) const;

Loading…
Cancel
Save