Skip to content

Commit

Permalink
Merge pull request #15375 from volzhs/button-group
Browse files Browse the repository at this point in the history
Remove button from button_group when free
  • Loading branch information
akien-mga authored Jan 5, 2018
2 parents 061db1c + 13af5e8 commit 8e82404
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scene/gui/base_button.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -539,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()) {
Expand Down

0 comments on commit 8e82404

Please sign in to comment.