forked from teamnwah/openmw-tes3coop
some fixes to info record sorting (doesn't address the main problem)
This commit is contained in:
parent
935d9241d8
commit
ec6018928c
1 changed files with 16 additions and 1 deletions
|
@ -38,7 +38,22 @@ void CSMWorld::InfoCollection::load (const Info& record, bool base)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index==-1)
|
if (index==-1)
|
||||||
index = getIdMap().size();
|
{
|
||||||
|
std::pair<MapConstIterator, MapConstIterator> range = getTopicRange (topic);
|
||||||
|
|
||||||
|
if (range.first==range.second)
|
||||||
|
index = getIdMap().size();
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (; range.first!=range.second; ++range.first)
|
||||||
|
{
|
||||||
|
if (range.first->second>index)
|
||||||
|
index = range.first->second;
|
||||||
|
}
|
||||||
|
|
||||||
|
++index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
insertRecord (record2, index);
|
insertRecord (record2, index);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue