forked from teamnwah/openmw-tes3coop
removed more hardcoded column numbers
This commit is contained in:
parent
302e2f8e9a
commit
7ede6573eb
1 changed files with 5 additions and 2 deletions
|
@ -230,9 +230,12 @@ CSMWorld::UniversalId CSVWorld::Table::getUniversalId (int row) const
|
|||
{
|
||||
row = mProxyModel->mapToSource (mProxyModel->index (row, 0)).row();
|
||||
|
||||
int idColumn = mModel->findColumnIndex (CSMWorld::Columns::ColumnId_Id);
|
||||
int typeColumn = mModel->findColumnIndex (CSMWorld::Columns::ColumnId_RecordType);
|
||||
|
||||
return CSMWorld::UniversalId (
|
||||
static_cast<CSMWorld::UniversalId::Type> (mModel->data (mModel->index (row, 2)).toInt()),
|
||||
mModel->data (mModel->index (row, 0)).toString().toUtf8().constData());
|
||||
static_cast<CSMWorld::UniversalId::Type> (mModel->data (mModel->index (row, typeColumn)).toInt()),
|
||||
mModel->data (mModel->index (row, idColumn)).toString().toUtf8().constData());
|
||||
}
|
||||
|
||||
void CSVWorld::Table::editRecord()
|
||||
|
|
Loading…
Reference in a new issue