mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:23:52 +00:00
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();
|
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 (
|
return CSMWorld::UniversalId (
|
||||||
static_cast<CSMWorld::UniversalId::Type> (mModel->data (mModel->index (row, 2)).toInt()),
|
static_cast<CSMWorld::UniversalId::Type> (mModel->data (mModel->index (row, typeColumn)).toInt()),
|
||||||
mModel->data (mModel->index (row, 0)).toString().toUtf8().constData());
|
mModel->data (mModel->index (row, idColumn)).toString().toUtf8().constData());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSVWorld::Table::editRecord()
|
void CSVWorld::Table::editRecord()
|
||||||
|
|
Loading…
Reference in a new issue