mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:53:51 +00:00
avoid use of column number literals
This commit is contained in:
parent
937f5b11a2
commit
20bd0707dc
1 changed files with 6 additions and 2 deletions
|
@ -69,7 +69,9 @@ CSMWorld::RevertCommand::~RevertCommand()
|
|||
|
||||
void CSMWorld::RevertCommand::redo()
|
||||
{
|
||||
QModelIndex index = mModel.getModelIndex (mId, 1);
|
||||
int column = mModel.findColumnIndex (Columns::ColumnId_Modification);
|
||||
|
||||
QModelIndex index = mModel.getModelIndex (mId, column);
|
||||
RecordBase::State state = static_cast<RecordBase::State> (mModel.data (index).toInt());
|
||||
|
||||
if (state==RecordBase::State_ModifiedOnly)
|
||||
|
@ -102,7 +104,9 @@ CSMWorld::DeleteCommand::~DeleteCommand()
|
|||
|
||||
void CSMWorld::DeleteCommand::redo()
|
||||
{
|
||||
QModelIndex index = mModel.getModelIndex (mId, 1);
|
||||
int column = mModel.findColumnIndex (Columns::ColumnId_Modification);
|
||||
|
||||
QModelIndex index = mModel.getModelIndex (mId, column);
|
||||
RecordBase::State state = static_cast<RecordBase::State> (mModel.data (index).toInt());
|
||||
|
||||
if (state==RecordBase::State_ModifiedOnly)
|
||||
|
|
Loading…
Reference in a new issue