diff options
| author | Juan Linietsky | 2017-01-13 10:45:50 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2017-01-13 10:45:50 -0300 |
| commit | 04c749a1f034c0b2256fdca0ca2675f696b490e8 (patch) | |
| tree | c908a64edf3f61bba725051c8f60c6a108acbb84 /scene/gui/base_button.cpp | |
| parent | a2903fc51d1d20eba4dc451bdacbe477d6670163 (diff) | |
| download | godot-04c749a1f034c0b2256fdca0ca2675f696b490e8.tar.gz godot-04c749a1f034c0b2256fdca0ca2675f696b490e8.tar.zst godot-04c749a1f034c0b2256fdca0ca2675f696b490e8.zip | |
Diffstat (limited to 'scene/gui/base_button.cpp')
| -rw-r--r-- | scene/gui/base_button.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index 45c491cd7..e16190677 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -297,7 +297,7 @@ void BaseButton::_notification(int p_what) { } - if (p_what==NOTIFICATION_VISIBILITY_CHANGED && !is_visible()) { + if (p_what==NOTIFICATION_VISIBILITY_CHANGED && !is_visible_in_tree()) { if (!toggle_mode) { status.pressed = false; @@ -453,7 +453,7 @@ Ref<ShortCut> BaseButton:: get_shortcut() const { void BaseButton::_unhandled_input(InputEvent p_event) { - if (!is_disabled() && is_visible() && p_event.is_pressed() && !p_event.is_echo() && shortcut.is_valid() && shortcut->is_shortcut(p_event)) { + if (!is_disabled() && is_visible_in_tree() && p_event.is_pressed() && !p_event.is_echo() && shortcut.is_valid() && shortcut->is_shortcut(p_event)) { if (get_viewport()->get_modal_stack_top() && !get_viewport()->get_modal_stack_top()->is_a_parent_of(this)) return; //ignore because of modal window |
