From 253c660d8e3341ad2d78658a23e599d5aaa84c00 Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Sat, 12 Nov 2011 13:19:14 +0100 Subject: Removed hiding of button popup when setting the text to empty The text is never set to an empty string, especially not while the mouse is over the button. The popup will be updated or hidden by mouseMoved anyway. Reviewed-by: Thorbjorn Lindeijer --- src/gui/widgets/button.cpp | 7 ------- src/gui/widgets/button.h | 3 ++- 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp index 2664c655..86c3b80d 100644 --- a/src/gui/widgets/button.cpp +++ b/src/gui/widgets/button.cpp @@ -353,10 +353,3 @@ void Button::mouseExited(gcn::MouseEvent &event) mTextPopup->setVisible(false); } - -void Button::setButtonPopupText(const std::string& text) -{ - mPopupText = text; - if (mPopupText.empty()) - mTextPopup->setVisible(false); -} diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h index 94d550e9..371c8f3e 100644 --- a/src/gui/widgets/button.h +++ b/src/gui/widgets/button.h @@ -79,7 +79,8 @@ class Button : public gcn::Button * * @note: An empty text will disable the popup. */ - void setButtonPopupText(const std::string& text = std::string()); + void setButtonPopupText(const std::string& text = std::string()) + { mPopupText = text; } void logic(); void mouseMoved(gcn::MouseEvent &event); -- cgit v1.2.3-70-g09d2