summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorOverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com>2020-01-09 01:01:37 +0200
committerOverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com>2020-01-09 02:17:53 +0200
commitbf4a0242fff2152ce7983d811c1cac8b8acf27ba (patch)
tree1702d8c6ff2cb218287574a00c0c0055304dcc14 /scene/gui
parentb9a553f99de109427fc8ac62f7f3de0ec708a1b8 (diff)
Fixes BaseButton not triggering the "pressed" signal on "Button Press" Action Mode
This should fix #34935
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/base_button.cpp2
1 files changed, 1 insertions, 1 deletions
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<InputEvent> 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();
}
}