diff options
Diffstat (limited to 'scene/gui/base_button.cpp')
-rw-r--r-- | scene/gui/base_button.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index b2020d44e8..1cdc6f8057 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -31,7 +31,7 @@ #include "base_button.h" #include "core/os/keyboard.h" -#include "scene/main/viewport.h" +#include "scene/main/window.h" #include "scene/scene_string_names.h" void BaseButton::_unpress_group() { @@ -357,9 +357,6 @@ void BaseButton::_unhandled_input(Ref<InputEvent> p_event) { if (!is_disabled() && is_visible_in_tree() && !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 - on_action_event(p_event); } } @@ -501,7 +498,7 @@ BaseButton *ButtonGroup::get_pressed_button() { return E->get(); } - return NULL; + return nullptr; } void ButtonGroup::_bind_methods() { |