1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-24 18:39:59 +00:00

Fixed incorrect comparison with current race, should use the ID not the name.

This commit is contained in:
Jan Borsodi 2010-09-19 04:28:12 +02:00
parent 54996684aa
commit 07b1b21b29

View File

@ -129,7 +129,7 @@ void RaceDialog::setRaceId(const std::string &raceId)
size_t count = raceList->getItemCount(); size_t count = raceList->getItemCount();
for (size_t i = 0; i < count; ++i) for (size_t i = 0; i < count; ++i)
{ {
if (boost::iequals(raceList->getItem(i), raceId)) if (boost::iequals(*raceList->getItemDataAt<std::string>(i), raceId))
{ {
raceList->setIndexSelected(i); raceList->setIndexSelected(i);
break; break;
@ -230,7 +230,7 @@ void RaceDialog::updateRaces()
continue; continue;
raceList->addItem(race.name, it->first); raceList->addItem(race.name, it->first);
if (boost::iequals(race.name, currentRaceId)) if (boost::iequals(it->first, currentRaceId))
raceList->setIndexSelected(index); raceList->setIndexSelected(index);
++index; ++index;
} }