Clear menu stack on MenuManager::set_menu() to avoid accidentally stacking menus
authorIngo Ruhnke <grumbel@gmail.com>
Fri, 15 Aug 2014 08:07:26 +0000 (10:07 +0200)
committerIngo Ruhnke <grumbel@gmail.com>
Fri, 15 Aug 2014 08:07:26 +0000 (10:07 +0200)
src/gui/menu_manager.cpp

index d30f065..3f9ff8e 100644 (file)
@@ -261,6 +261,7 @@ MenuManager::set_menu(std::unique_ptr<Menu> menu)
   {
     transition(m_menu_stack.empty() ? nullptr : m_menu_stack.back().get(),
                menu.get());
+    m_menu_stack.clear();
     m_menu_stack.push_back(std::move(menu));
   }
   else