Răsfoiți Sursa

If spinbox text can't be parsed use last updated text

Robert Yevdokimov 1 an în urmă
părinte
comite
76a6650fd9
1 a modificat fișierele cu 1 adăugiri și 0 ștergeri
  1. 1 0
      scene/gui/spin_box.cpp

+ 1 - 0
scene/gui/spin_box.cpp

@@ -83,6 +83,7 @@ void SpinBox::_text_submitted(const String &p_string) {
 
 
 		err = expr->parse(text);
 		err = expr->parse(text);
 		if (err != OK) {
 		if (err != OK) {
+			_update_text();
 			return;
 			return;
 		}
 		}
 	}
 	}