mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-29 08:00:56 -04:00
Proper index for Modified column in ModifyCommand
This commit is contained in:
parent
7644a46ded
commit
afb36b73eb
@ -33,7 +33,14 @@ CSMWorld::ModifyCommand::ModifyCommand (QAbstractItemModel& model, const QModelI
|
|||||||
{
|
{
|
||||||
mHasRecordState = true;
|
mHasRecordState = true;
|
||||||
int stateColumnIndex = table->findColumnIndex(Columns::ColumnId_Modification);
|
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());
|
mOldRecordState = static_cast<CSMWorld::RecordBase::State>(table->data(mRecordStateIndex).toInt());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user