aboutsummaryrefslogtreecommitdiff
path: root/scene/gui/base_button.cpp
diff options
context:
space:
mode:
authorHein-Pieter van Braam2018-01-28 18:49:22 +0100
committerHein-Pieter van Braam2018-02-04 20:00:23 +0100
commitef49c166f688cc26b64079add7b15153e1f750dd (patch)
tree00d1e33acff0d5a3e936f154f36668f5635d50c3 /scene/gui/base_button.cpp
parent77cc0a023b82dccacee27f67e8df14df91c1f3b7 (diff)
downloadgodot-ef49c166f688cc26b64079add7b15153e1f750dd.tar.gz
godot-ef49c166f688cc26b64079add7b15153e1f750dd.tar.zst
godot-ef49c166f688cc26b64079add7b15153e1f750dd.zip
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)
Diffstat (limited to '')
-rw-r--r--scene/gui/base_button.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp
index 8b9469021..9dfd388c3 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 {