mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
Copy base data to modified.
This commit is contained in:
parent
a54ab153b0
commit
128371c902
@ -61,7 +61,9 @@ namespace CSMWorld
|
||||
template <typename ESXRecordT>
|
||||
RecordBase *Record<ESXRecordT>::clone() const
|
||||
{
|
||||
return new Record<ESXRecordT> (*this);
|
||||
Record<ESXRecordT> *copy = new Record<ESXRecordT> (*this);
|
||||
copy->mModified = (*this).get();
|
||||
return copy;
|
||||
}
|
||||
|
||||
template <typename ESXRecordT>
|
||||
|
@ -471,7 +471,7 @@ void CSMWorld::RefIdCollection::cloneRecord(const std::string& origin,
|
||||
const CSMWorld::UniversalId::Type type)
|
||||
{
|
||||
std::auto_ptr<RecordBase> newRecord(mData.getRecord(mData.searchId(origin)).clone());
|
||||
newRecord->mState = RecordBase::State_BaseOnly;
|
||||
newRecord->mState = RecordBase::State_ModifiedOnly;
|
||||
mAdapters.find(type)->second->setId(*newRecord, destination);
|
||||
mData.insertRecord(*newRecord, type, destination);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user