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
This commit is contained in:
Hein-Pieter van Braam 2018-01-28 18:49:22 +01:00
parent 4caadae0f1
commit 713f190a30
1 changed files with 0 additions and 4 deletions

View File

@ -311,10 +311,6 @@ void BaseButton::set_disabled(bool p_disabled) {
status.disabled = p_disabled; status.disabled = p_disabled;
update(); update();
_change_notify("disabled"); _change_notify("disabled");
if (p_disabled)
set_focus_mode(FOCUS_NONE);
else
set_focus_mode(enabled_focus_mode);
} }
bool BaseButton::is_disabled() const { bool BaseButton::is_disabled() const {