mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-30 21:32:42 +00:00
Proper index for Modified column in ModifyCommand
This commit is contained in:
parent
2242920b85
commit
ec98a1220f
@ -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…
x
Reference in New Issue
Block a user