mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 10:53:51 +00:00
Corrections, according to the comments. Thanks for the review. :-)
This commit is contained in:
parent
d3000ce099
commit
2bd98a69ab
2 changed files with 4 additions and 6 deletions
|
@ -170,7 +170,5 @@ void CSMWorld::CloneCommand::redo()
|
||||||
|
|
||||||
void CSMWorld::CloneCommand::undo()
|
void CSMWorld::CloneCommand::undo()
|
||||||
{
|
{
|
||||||
mModel.removeRow (mModel.getModelIndex (mIdDestination, 0).row()); //should be enough
|
mModel.removeRow (mModel.getModelIndex (mIdDestination, 0).row());
|
||||||
}
|
}
|
||||||
|
|
||||||
// kate: indent-mode cstyle; indent-width 4; replace-tabs on;
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#include "refidcollection.hpp"
|
#include "refidcollection.hpp"
|
||||||
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <components/esm/esmreader.hpp>
|
#include <components/esm/esmreader.hpp>
|
||||||
|
|
||||||
|
@ -453,11 +454,10 @@ void CSMWorld::RefIdCollection::cloneRecord(const std::string& origin,
|
||||||
const std::string& destination,
|
const std::string& destination,
|
||||||
const CSMWorld::UniversalId::Type type)
|
const CSMWorld::UniversalId::Type type)
|
||||||
{
|
{
|
||||||
RecordBase *newRecord = mData.getRecord(mData.searchId(origin)).clone();
|
std::auto_ptr<RecordBase> newRecord(mData.getRecord(mData.searchId(origin)).clone());
|
||||||
newRecord->mState = RecordBase::State_ModifiedOnly;
|
newRecord->mState = RecordBase::State_ModifiedOnly;
|
||||||
mAdapters.find(type)->second->setId(*newRecord, destination);
|
mAdapters.find(type)->second->setId(*newRecord, destination);
|
||||||
mData.insertRecord(*newRecord, type, destination);
|
mData.insertRecord(*newRecord, type, destination);
|
||||||
delete newRecord;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSMWorld::RefIdCollection::appendRecord (const RecordBase& record,
|
void CSMWorld::RefIdCollection::appendRecord (const RecordBase& record,
|
||||||
|
|
Loading…
Reference in a new issue