summaryrefslogtreecommitdiffstats
path: root/scene/gui/base_button.cpp
diff options
context:
space:
mode:
authorMichael Alexsander <michaelalexsander@protonmail.com>2022-08-27 13:32:45 -0300
committerMichael Alexsander <michaelalexsander@protonmail.com>2022-08-28 01:15:03 -0300
commit221344b9e29a0302cace81cb641e0535628b1fec (patch)
treeb1f3b72d9e323fe6c416333431009fc09dbac42d /scene/gui/base_button.cpp
parent202f0f2f1bcdcabb8e6514c42b19936591ac7b0f (diff)
downloadredot-engine-221344b9e29a0302cace81cb641e0535628b1fec.tar.gz
Fix some corner cases in the `Menu/OptionButton` item auto-highlight
Diffstat (limited to 'scene/gui/base_button.cpp')
-rw-r--r--scene/gui/base_button.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp
index 87a7355bb2..cee7c049a9 100644
--- a/scene/gui/base_button.cpp
+++ b/scene/gui/base_button.cpp
@@ -65,8 +65,9 @@ void BaseButton::gui_input(const Ref<InputEvent> &p_event) {
bool button_masked = mouse_button.is_valid() && (mouse_button_to_mask(mouse_button->get_button_index()) & button_mask) != MouseButton::NONE;
if (button_masked || ui_accept) {
was_mouse_pressed = button_masked;
-
on_action_event(p_event);
+ was_mouse_pressed = false;
+
return;
}