ソースを参照

Preserve caret when updating EditorPropertyText

kobewi 2 年 前
コミット
c75338fce6
1 ファイル変更2 行追加0 行削除
  1. 2 0
      editor/editor_properties.cpp

+ 2 - 0
editor/editor_properties.cpp

@@ -90,7 +90,9 @@ void EditorPropertyText::update_property() {
 	String s = get_edited_object()->get(get_edited_property());
 	updating = true;
 	if (text->get_text() != s) {
+		int caret = text->get_caret_column();
 		text->set_text(s);
+		text->set_caret_column(caret);
 	}
 	text->set_editable(!is_read_only());
 	updating = false;