summaryrefslogtreecommitdiffstats
path: root/scene/gui/base_button.cpp
diff options
context:
space:
mode:
authorHein-Pieter van Braam <hp@tmm.cx>2018-01-28 18:49:22 +0100
committerHein-Pieter van Braam <hp@tmm.cx>2018-01-28 18:49:22 +0100
commit713f190a30ceac123125d216448ef322b1841286 (patch)
tree6b89f5a4b8a6ca772ee4cd644d37ad1f96c460df /scene/gui/base_button.cpp
parent4caadae0f15d658d464d125829039a2e35c68124 (diff)
downloadredot-engine-713f190a30ceac123125d216448ef322b1841286.tar.gz
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
Diffstat (limited to 'scene/gui/base_button.cpp')
-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 8b9469021c..9dfd388c3d 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 {