mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-31 23:45:35 +00:00
Return a correct index for a loaded record that was deleted
(cherry picked from commit a1389b87ba
)
This commit is contained in:
parent
0979d88b0c
commit
9503104129
1 changed files with 5 additions and 13 deletions
|
@ -61,22 +61,14 @@ namespace CSMWorld
|
|||
if (base)
|
||||
{
|
||||
removeRows (index, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
Record<ESXRecordT> baseRecord = getRecord (index);
|
||||
baseRecord.mState = RecordBase::State_Deleted;
|
||||
this->setRecord (index, baseRecord);
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
//
|
||||
//if (index != -1)
|
||||
//{
|
||||
// ESXRecordT existedRecord = getRecord(index).get();
|
||||
// IdAccessorT().getId(record) = IdAccessorT().getId(existedRecord);
|
||||
//}
|
||||
|
||||
Record<ESXRecordT> baseRecord = getRecord (index);
|
||||
baseRecord.mState = RecordBase::State_Deleted;
|
||||
setRecord (index, baseRecord);
|
||||
return index;
|
||||
}
|
||||
|
||||
return load (record, base, index);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue