1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-20 06:23:52 +00:00

mostly refreshing view.

This commit is contained in:
Marek Kochanowicz 2014-01-20 18:28:06 +01:00
parent 92ee252eef
commit d0a52b7b24
2 changed files with 10 additions and 1 deletions

View file

@ -129,7 +129,12 @@ void CSMWorld::IdTable::cloneRecord(const std::string& origin,
CSMWorld::UniversalId::ArgumentType argumentType,
CSMWorld::UniversalId::Type type)
{
int index = mIdCollection->getAppendIndex (destination);
beginInsertRows (QModelIndex(), index, index);
mIdCollection->cloneRecord(origin, destination, type, argumentType);
endInsertRows();
emit dataChanged (CSMWorld::IdTable::index (0, 0),
CSMWorld::IdTable::index (mIdCollection->getSize()-1, mIdCollection->getColumns()-1));
}

View file

@ -454,7 +454,11 @@ void CSMWorld::RefIdCollection::cloneRecord(const std::string& origin,
const CSMWorld::UniversalId::Type type,
const CSMWorld::UniversalId::ArgumentType argumentType)
{
RecordBase *newRecord = mData.getRecord(mData.searchId(origin)).clone();
newRecord->mState = RecordBase::State_ModifiedOnly;
mAdapters.find(type)->second->setId(*newRecord, destination);
mData.getAppendIndex(type);
//WIP
}
void CSMWorld::RefIdCollection::appendRecord (const RecordBase& record,