From fd94266b45dfcd8864cc0880224f622c4ae9f149 Mon Sep 17 00:00:00 2001 From: auria Date: Tue, 26 Apr 2011 17:39:07 +0000 Subject: [PATCH] Fixed disabled ribbon items can be accessed anyway if you use keyboard and not mouse git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8465 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/guiengine/widgets/ribbon_widget.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/guiengine/widgets/ribbon_widget.cpp b/src/guiengine/widgets/ribbon_widget.cpp index dc0520ed3..2c6994ef7 100644 --- a/src/guiengine/widgets/ribbon_widget.cpp +++ b/src/guiengine/widgets/ribbon_widget.cpp @@ -586,6 +586,11 @@ EventPropagation RibbonWidget::transmitEvent(Widget* w, std::string& originator, // bring focus back to enclosing ribbon widget this->setFocusForPlayer( playerID ); + if (m_selection[playerID] != -1) + { + if (m_children[m_selection[playerID]].m_deactivated) return EVENT_BLOCK; + } + return EVENT_LET; } // -----------------------------------------------------------------------------