Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix bug with deactivated widgets where visibility is changed

  • Loading branch information...
commit bf76fbff6ec058f4e186e27904313b4cc31fac62 1 parent 48b9016
@Flakebi Flakebi authored
View
6 src/guiengine/event_handler.cpp
@@ -631,7 +631,7 @@ void EventHandler::sendEventToUser(GUIEngine::Widget* widget, std::string& name,
EventPropagation EventHandler::onWidgetActivated(GUIEngine::Widget* w, const int playerID)
{
- if (w->m_deactivated) return EVENT_BLOCK;
+ if (!w->isActivated()) return EVENT_BLOCK;
Widget* parent = w->m_event_handler;
@@ -658,7 +658,7 @@ EventPropagation EventHandler::onWidgetActivated(GUIEngine::Widget* w, const int
parent = parent->m_event_handler;
}
- if (parent->m_deactivated) return EVENT_BLOCK;
+ if (!parent->isActivated()) return EVENT_BLOCK;
/* notify the found event event handler, and also notify the main callback if the
parent event handler says so */
@@ -699,7 +699,7 @@ EventPropagation EventHandler::onGUIEvent(const SEvent& event)
{
Widget* w = GUIEngine::getWidget(id);
if (w == NULL) break;
- if (w->m_deactivated)
+ if (!w->isActivated())
{
GUIEngine::getCurrentScreen()->onDisabledItemClicked(w->m_properties[PROP_ID].c_str());
return EVENT_BLOCK;
View
1  src/guiengine/widget.cpp
@@ -339,7 +339,6 @@ void Widget::setVisible(bool visible)
m_element->setVisible(visible);
}
m_is_visible = visible;
- m_deactivated = !visible;
const int childrenCount = m_children.size();
for (int n=0; n<childrenCount; n++)
View
2  src/guiengine/widgets/spinner_widget.hpp
@@ -173,8 +173,6 @@ namespace GUIEngine
/** Override method from base class Widget */
virtual void setDeactivated();
-
- bool isActivated() { return !m_deactivated; }
/** Display custom text in spinner */
void setCustomText(const core::stringw& text);
Please sign in to comment.
Something went wrong with that request. Please try again.