浏览代码

Fix LineEdit undo behaves strangely

ray90514 4 年之前
父节点
当前提交
7501c7f48a
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      scene/gui/line_edit.cpp

+ 1 - 0
scene/gui/line_edit.cpp

@@ -1234,6 +1234,7 @@ void LineEdit::delete_text(int p_from_column, int p_to_column) {
 void LineEdit::set_text(String p_text) {
 	clear_internal();
 	append_at_cursor(p_text);
+	_create_undo_state();
 
 	update();
 	cursor_pos = 0;