summaryrefslogtreecommitdiff
path: root/scene/gui/base_button.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/base_button.cpp')
-rw-r--r--scene/gui/base_button.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp
index 41ff000ac1..d765248cca 100644
--- a/scene/gui/base_button.cpp
+++ b/scene/gui/base_button.cpp
@@ -27,6 +27,7 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+
#include "base_button.h"
#include "os/keyboard.h"
@@ -538,15 +539,15 @@ BaseButton::BaseButton() {
set_focus_mode(FOCUS_ALL);
enabled_focus_mode = FOCUS_ALL;
action_mode = ACTION_MODE_BUTTON_RELEASE;
+}
+
+BaseButton::~BaseButton() {
if (button_group.is_valid()) {
button_group->buttons.erase(this);
}
}
-BaseButton::~BaseButton() {
-}
-
void ButtonGroup::get_buttons(List<BaseButton *> *r_buttons) {
for (Set<BaseButton *>::Element *E = buttons.front(); E; E = E->next()) {