Merge pull request #81094 from OXTyler/81071

Fix SpinBox not clearing text on improper input
This commit is contained in:
Rémi Verschelde 2023-09-11 15:37:18 +02:00
commit ca2d5b25fd
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -65,6 +65,7 @@ void SpinBox::_text_submitted(const String &p_string) {
// Ignore the prefix and suffix in the expression.
Error err = expr->parse(num.trim_prefix(prefix + " ").trim_suffix(" " + suffix));
if (err != OK) {
_update_text();
return;
}