Переглянути джерело

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

Paulb23 6 роки тому
батько
коміт
aea0761b25
1 змінених файлів з 3 додано та 0 видалено
  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;
 };