mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-19 17:39:44 +00:00
Proper index for Modified column in ModifyCommand
This commit is contained in:
parent
7644a46ded
commit
afb36b73eb
1 changed files with 8 additions and 1 deletions
|
@ -33,7 +33,14 @@ CSMWorld::ModifyCommand::ModifyCommand (QAbstractItemModel& model, const QModelI
|
|||
{
|
||||
mHasRecordState = true;
|
||||
int stateColumnIndex = table->findColumnIndex(Columns::ColumnId_Modification);
|
||||
mRecordStateIndex = table->index(mIndex.row(), stateColumnIndex);
|
||||
|
||||
int rowIndex = mIndex.row();
|
||||
if (mIndex.parent().isValid())
|
||||
{
|
||||
rowIndex = mIndex.parent().row();
|
||||
}
|
||||
|
||||
mRecordStateIndex = table->index(rowIndex, stateColumnIndex);
|
||||
mOldRecordState = static_cast<CSMWorld::RecordBase::State>(table->data(mRecordStateIndex).toInt());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue