Merge pull request #22062 from Leytak/patch-1
Discard button pressing flags on disable
This commit is contained in:
commit
08a24698eb
1 changed files with 8 additions and 0 deletions
|
@ -315,6 +315,14 @@ void BaseButton::set_disabled(bool p_disabled) {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
status.disabled = p_disabled;
|
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();
|
update();
|
||||||
_change_notify("disabled");
|
_change_notify("disabled");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue