mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 11:23:51 +00:00
More efficient implementation of an earlier fix so that id is searched only once
- see commit 306bfcbdf2
This commit is contained in:
parent
477e0ee912
commit
76e9a03596
1 changed files with 3 additions and 3 deletions
|
@ -163,9 +163,9 @@ void CSMWorld::IdTable::cloneRecord(const std::string& origin,
|
||||||
///This method can return only indexes to the top level table cells
|
///This method can return only indexes to the top level table cells
|
||||||
QModelIndex CSMWorld::IdTable::getModelIndex (const std::string& id, int column) const
|
QModelIndex CSMWorld::IdTable::getModelIndex (const std::string& id, int column) const
|
||||||
{
|
{
|
||||||
int idx = mIdCollection->searchId (id);
|
int row = mIdCollection->searchId (id);
|
||||||
if (idx != -1)
|
if (row != -1)
|
||||||
return index(mIdCollection->getIndex (id), column);
|
return index(row, column);
|
||||||
else
|
else
|
||||||
return QModelIndex();
|
return QModelIndex();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue