Explorar o código

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

Paulb23 %!s(int64=6) %!d(string=hai) anos
pai
achega
aea0761b25
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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;
 };