浏览代码

Merge pull request #81094 from OXTyler/81071

Fix SpinBox not clearing text on improper input
Rémi Verschelde 2 年之前
父节点
当前提交
ca2d5b25fd
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      scene/gui/spin_box.cpp

+ 1 - 0
scene/gui/spin_box.cpp

@@ -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;
 	}