Skip to content

Commit

Permalink
Fix reserch project order after refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Yankes committed Sep 9, 2018
1 parent 4fc5ad0 commit 5fb565c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Basescape/NewResearchListState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ void NewResearchListState::fillProjectList()
_lstResearch->clearList();
// Note: this is the *only* place where this method is called with considerDebugMode = true
_game->getSavedGame()->getAvailableResearchProjects(_projects, _game->getMod() , _base, true);
// sort by list order
std::sort(_projects.begin(), _projects.end(), [&](RuleResearch* a, RuleResearch* b) { return a->getListOrder() < b->getListOrder(); });
std::vector<RuleResearch*>::iterator it = _projects.begin();
while (it != _projects.end())
{
Expand Down

0 comments on commit 5fb565c

Please sign in to comment.