diff options
| author | Juan Linietsky | 2017-01-10 01:04:31 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2017-01-10 01:07:03 -0300 |
| commit | a503f8aadcb8cbc85bde589fb25ea06e599b367b (patch) | |
| tree | 070ebbf0dd6af2d43c5519f5e32045b3512f0e9e /scene/gui/check_box.cpp | |
| parent | 68c008ca8d87a1f72fcf17467ee43714954e9ce4 (diff) | |
| download | godot-a503f8aadcb8cbc85bde589fb25ea06e599b367b.tar.gz godot-a503f8aadcb8cbc85bde589fb25ea06e599b367b.tar.zst godot-a503f8aadcb8cbc85bde589fb25ea06e599b367b.zip | |
Diffstat (limited to 'scene/gui/check_box.cpp')
| -rw-r--r-- | scene/gui/check_box.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/scene/gui/check_box.cpp b/scene/gui/check_box.cpp index 901386eb4..c9803bc65 100644 --- a/scene/gui/check_box.cpp +++ b/scene/gui/check_box.cpp @@ -56,14 +56,8 @@ void CheckBox::_notification(int p_what) { bool CheckBox::is_radio() { - Node* parent = this; - do { - parent = parent->get_parent(); - if (parent->cast_to<ButtonGroup>()) - break; - } while (parent); - return (parent != 0); + return get_button_group().is_valid(); } CheckBox::CheckBox(const String &p_text): |
