mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 15:41:13 -04:00
Return a correct index for a loaded record that was deleted
(cherry picked from commit a1389b87bacd08f54c4c146c7a0b6d1ed51edc54)
This commit is contained in:
parent
0979d88b0c
commit
9503104129
@ -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…
x
Reference in New Issue
Block a user