Browse Source

Place caret at 0,0 when setting text not at the end

Paulb23 5 năm trước cách đây
mục cha
commit
aea0761b25
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      scene/gui/text_edit.cpp

+ 3 - 0
scene/gui/text_edit.cpp

@@ -4751,6 +4751,9 @@ void TextEdit::set_text(String p_text) {
 		selection.active = false;
 	}
 
+	cursor_set_line(0);
+	cursor_set_column(0);
+
 	update();
 	setting_text = false;
 };