From 9b7fdf3b5b69ac89970e67c382bb4a383b8a375c Mon Sep 17 00:00:00 2001 From: auria Date: Thu, 3 Feb 2011 00:27:30 +0000 Subject: [PATCH] Fixed wrong label shown in button if editing a keyboard after editing a gamepad git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7591 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/states_screens/options_screen_input2.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/states_screens/options_screen_input2.cpp b/src/states_screens/options_screen_input2.cpp index 729594a5a..48fdd2782 100644 --- a/src/states_screens/options_screen_input2.cpp +++ b/src/states_screens/options_screen_input2.cpp @@ -76,16 +76,20 @@ void OptionsScreenInput2::init() //deleteBtn->setDeactivated(); } - else if (input_manager->getDeviceList()->getKeyboardAmount() < 2) - { - // don't allow deleting the last config - deleteBtn->setDeactivated(); - } else { - deleteBtn->setActivated(); + deleteBtn->setLabel(_("Delete Configuration")); + + if (input_manager->getDeviceList()->getKeyboardAmount() < 2) + { + // don't allow deleting the last config + deleteBtn->setDeactivated(); + } + else + { + deleteBtn->setActivated(); + } } - LabelWidget* label = this->getWidget("title"); label->setText( m_config->getName().c_str() );