From ef49c166f688cc26b64079add7b15153e1f750dd Mon Sep 17 00:00:00 2001 From: Hein-Pieter van Braam Date: Sun, 28 Jan 2018 18:49:22 +0100 Subject: [PATCH] Allow focus on disabled buttons This behavior better matches other gui toolkits. A selected disabled button still can't be interacted with but it can now be selected. This seems to be what QT and GTK do also. This fixes #16131 (cherry picked from commit 713f190a30ceac123125d216448ef322b1841286) --- scene/gui/base_button.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index 8b9469021cd..9dfd388c3dc 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -311,10 +311,6 @@ void BaseButton::set_disabled(bool p_disabled) { status.disabled = p_disabled; update(); _change_notify("disabled"); - if (p_disabled) - set_focus_mode(FOCUS_NONE); - else - set_focus_mode(enabled_focus_mode); } bool BaseButton::is_disabled() const {