FIRE-21172 - Sort AO set by name

Beq 2018-11-08 10:44:44 +00:00
parent 1618e7a9dd
commit d3f29c3a66
1 changed files with 8 additions and 0 deletions

View File

@ -137,7 +137,15 @@ void FloaterAO::updateList()
currentSetName = AOEngine::instance().getCurrentSetName();
}
// Lambda provides simple Alpha sorting, note this is case sensitive.
auto sortRuleLambda = [](const AOSet* s1, const AOSet* s2) -> bool
{
return s1->getName() < s2->getName();
};
mSetList=AOEngine::instance().getSetList();
std::sort(mSetList.begin(), mSetList.end(), sortRuleLambda);
mSetSelector->removeall();
mSetSelectorSmall->removeall();
mSetSelector->clear();