Skip to content

Commit

Permalink
Clear menu stack when changing languages to force recreation of menus…
Browse files Browse the repository at this point in the history
… with the correct language
  • Loading branch information
Grumbel committed Aug 10, 2014
1 parent fb4786d commit 3cd485d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/supertux/menu/language_menu.cpp
Expand Up @@ -62,14 +62,14 @@ LanguageMenu::menu_action(MenuItem* item)
dictionary_manager->set_language(language); // set currently detected language
g_config->locale = ""; // do auto detect every time on startup
g_config->save();
MenuManager::instance().pop_menu();
MenuManager::instance().clear_menu_stack();
}
else if (item->id == MNID_LANGUAGE_ENGLISH) // english
{
g_config->locale = "en";
dictionary_manager->set_language(tinygettext::Language::from_name(g_config->locale));
g_config->save();
MenuManager::instance().pop_menu();
MenuManager::instance().clear_menu_stack();
}
else
{
Expand All @@ -83,7 +83,7 @@ LanguageMenu::menu_action(MenuItem* item)
g_config->locale = i->str();
dictionary_manager->set_language(*i);
g_config->save();
MenuManager::instance().pop_menu();
MenuManager::instance().clear_menu_stack();
break;
}
}
Expand Down

0 comments on commit 3cd485d

Please sign in to comment.