forked from teamnwah/openmw-tes3coop
Return a correct index for a loaded record that was deleted
This commit is contained in:
parent
5e623a2a1d
commit
a1389b87ba
1 changed files with 5 additions and 13 deletions
|
@ -61,22 +61,14 @@ namespace CSMWorld
|
||||||
if (base)
|
if (base)
|
||||||
{
|
{
|
||||||
removeRows (index, 1);
|
removeRows (index, 1);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Record<ESXRecordT> baseRecord = getRecord (index);
|
|
||||||
baseRecord.mState = RecordBase::State_Deleted;
|
|
||||||
this->setRecord (index, baseRecord);
|
|
||||||
}
|
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
//
|
|
||||||
//if (index != -1)
|
Record<ESXRecordT> baseRecord = getRecord (index);
|
||||||
//{
|
baseRecord.mState = RecordBase::State_Deleted;
|
||||||
// ESXRecordT existedRecord = getRecord(index).get();
|
setRecord (index, baseRecord);
|
||||||
// IdAccessorT().getId(record) = IdAccessorT().getId(existedRecord);
|
return index;
|
||||||
//}
|
}
|
||||||
|
|
||||||
return load (record, base, index);
|
return load (record, base, index);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue