Merge pull request #22062 from Leytak/patch-1

Discard button pressing flags on disable
This commit is contained in:
Rémi Verschelde 2018-10-02 09:49:17 +02:00 committed by GitHub
commit 08a24698eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -315,6 +315,14 @@ void BaseButton::set_disabled(bool p_disabled) {
return;
status.disabled = p_disabled;
if (p_disabled) {
if (!toggle_mode) {
status.pressed = false;
}
status.press_attempt = false;
status.pressing_inside = false;
status.pressing_button = 0;
}
update();
_change_notify("disabled");
}