From: Ingo Ruhnke Date: Sun, 10 Aug 2014 03:56:41 +0000 (+0200) Subject: Clear menu stack when changing languages to force recreation of menus with the correc... X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=3cd485d8eb92172dfee7ac7de03234ccdd7ee03e;p=supertux.git Clear menu stack when changing languages to force recreation of menus with the correct language --- diff --git a/src/supertux/menu/language_menu.cpp b/src/supertux/menu/language_menu.cpp index ce7459581..399ec2103 100644 --- a/src/supertux/menu/language_menu.cpp +++ b/src/supertux/menu/language_menu.cpp @@ -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 { @@ -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; } }