From bf4a0242fff2152ce7983d811c1cac8b8acf27ba Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Thu, 9 Jan 2020 01:01:37 +0200 Subject: Fixes BaseButton not triggering the "pressed" signal on "Button Press" Action Mode This should fix #34935 --- scene/gui/base_button.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index 65912c1c07..b2020d44e8 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -165,7 +165,7 @@ void BaseButton::on_action_event(Ref p_event) { _pressed(); } } else { - if (!p_event->is_pressed()) { + if ((p_event->is_pressed() && action_mode == ACTION_MODE_BUTTON_PRESS) || (!p_event->is_pressed() && action_mode == ACTION_MODE_BUTTON_RELEASE)) { _pressed(); } } -- cgit v1.2.3