From 4ed413d5d51962ded944978f87d5a7a97a6565c8 Mon Sep 17 00:00:00 2001 From: cosmosninja Date: Tue, 11 Dec 2007 01:24:15 +0000 Subject: [PATCH] Fix all the remaining 'tried to lighten unnamed widget' warnings git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1338 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/gui/menu_manager.cpp | 2 +- src/widget_manager.hpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/menu_manager.cpp b/src/gui/menu_manager.cpp index 361e37703..c1a035aaf 100644 --- a/src/gui/menu_manager.cpp +++ b/src/gui/menu_manager.cpp @@ -213,7 +213,7 @@ void MenuManager::update() } // switch - if( id != MENUID_EXITGAME ) + if( !widget_manager->is_empty() ) { // Restores the previously selected widget if there was one. if (saved_widget != WidgetManager::WGT_NONE) diff --git a/src/widget_manager.hpp b/src/widget_manager.hpp index 058008796..28c0f0156 100644 --- a/src/widget_manager.hpp +++ b/src/widget_manager.hpp @@ -128,6 +128,8 @@ public: WidgetManager(); ~WidgetManager(); + bool is_empty() { return m_widgets.empty(); } + bool add_wgt ( const int TOKEN, //A number that names the widget.