From f40af93ba49aa0be2333bea4303e2302d3f7e5ee Mon Sep 17 00:00:00 2001 From: cosmosninja Date: Tue, 27 Nov 2007 01:34:21 +0000 Subject: [PATCH] Fixes bug that causes the selection of the last active widget instead of the first active widget by default. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1307 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/widget_manager.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/widget_manager.cpp b/src/widget_manager.cpp index 6a33eb13a..095287a72 100644 --- a/src/widget_manager.cpp +++ b/src/widget_manager.cpp @@ -475,8 +475,11 @@ bool WidgetManager::layout(const WidgetArea POSITION) //Always select the first active widget by default for( int i = 0; i < NUM_WIDGETS; ++i ) { - if( m_widgets[i].active) m_selected_wgt_token = m_widgets[i].token; - + if( m_widgets[i].active) + { + m_selected_wgt_token = m_widgets[i].token; + break; + } } //Cleanups