From 19c6b66f41396dc1a06ea17ab70f27a4f8802ade Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Wed, 28 Sep 2011 18:04:21 +0200 Subject: Small changes requested by o11c - part 1. --- src/gui/widgets/button.cpp | 5 +++-- src/gui/widgets/button.h | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp index 61ec28a2..f0d7e022 100644 --- a/src/gui/widgets/button.cpp +++ b/src/gui/widgets/button.cpp @@ -37,8 +37,8 @@ int Button::mInstances = 0; float Button::mAlpha = 1.0; -ImageRect* Button::mButton; -TextPopup* Button::mTextPopup = 0; +ImageRect *Button::mButton; +TextPopup *Button::mTextPopup = 0; enum{ BUTTON_STANDARD, // 0 @@ -188,6 +188,7 @@ Button::~Button() // Remove the popup delete mTextPopup; + mTextPopup = 0; } removeButtonIcon(); } diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h index 7463d2ad..94d550e9 100644 --- a/src/gui/widgets/button.h +++ b/src/gui/widgets/button.h @@ -96,7 +96,11 @@ class Button : public gcn::Button Image** mButtonIcon; /**< Button Icons graphics */ - static TextPopup* mTextPopup; /**< The buttons popup */ + /** + * The buttons popup + * @note: This is a global object. One for all the buttons. + */ + static TextPopup* mTextPopup; std::string mPopupText; /**< the current button text */ }; -- cgit v1.2.3-70-g09d2