Return a correct index for a loaded record that was deleted

This commit is contained in:
Stanislav Bas 2015-07-14 23:31:16 +03:00
parent 5e623a2a1d
commit a1389b87ba

View file

@ -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);
} }