force re-populate tileset and techtree UI after download

This commit is contained in:
Mark Vejvoda 2011-11-29 03:25:36 +00:00
parent 1cd6520335
commit 28ae161c25
1 changed files with 11 additions and 0 deletions

View File

@ -3634,6 +3634,10 @@ void MenuStateConnectedGame::FTPClient_CallbackEvent(string itemName,
// Reload tilesets for the UI
findDirs(Config::getInstance().getPathListForType(ptTilesets), tilesetFiles);
std::vector<string> tilesetsFormatted = tilesetFiles;
std::for_each(tilesetsFormatted.begin(), tilesetsFormatted.end(), FormatString());
listBoxTileset.setItems(tilesetsFormatted);
}
else {
curl_version_info_data *curlVersion= curl_version_info(CURLVERSION_NOW);
@ -3703,6 +3707,13 @@ void MenuStateConnectedGame::FTPClient_CallbackEvent(string itemName,
// Reload tilesets for the UI
findDirs(Config::getInstance().getPathListForType(ptTechs), techTreeFiles);
int initialTechSelection=0;
std::vector<string> techsFormatted = techTreeFiles;
for(int i= 0; i < techsFormatted.size(); i++){
techsFormatted.at(i)= formatString(techsFormatted.at(i));
}
listBoxTechTree.setItems(techsFormatted);
}
else {
curl_version_info_data *curlVersion= curl_version_info(CURLVERSION_NOW);