1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 08:23:53 +00:00

some fixes to info record sorting (doesn't address the main problem)

This commit is contained in:
Marc Zinnschlag 2013-11-10 12:09:49 +01:00
parent 935d9241d8
commit ec6018928c

View file

@ -38,7 +38,22 @@ void CSMWorld::InfoCollection::load (const Info& record, bool base)
}
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);
}