summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/SCsub8
-rw-r--r--editor/plugins/script_editor_plugin.cpp6
-rw-r--r--editor/plugins/script_text_editor.cpp2
3 files changed, 10 insertions, 6 deletions
diff --git a/editor/SCsub b/editor/SCsub
index e44b4e4bb2..772feca5f8 100644
--- a/editor/SCsub
+++ b/editor/SCsub
@@ -237,7 +237,7 @@ def make_license_header(target, source, env):
g.write("static const char *about_license =")
for line in f:
- escaped_string = escape_string(line.strip().replace("\"", "\\\""))
+ escaped_string = escape_string(line.strip())
g.write("\n\t\"" + escaped_string + "\\n\"")
g.write(";\n")
@@ -323,12 +323,12 @@ def make_license_header(target, source, env):
for k in j[0].split("\n"):
if file_body != "":
file_body += "\\n\"\n"
- escaped_string = escape_string(k.strip().replace("\"", "\\\""))
+ escaped_string = escape_string(k.strip())
file_body += "\t\"" + escaped_string
for k in j[1].split("\n"):
if copyright_body != "":
copyright_body += "\\n\"\n"
- escaped_string = escape_string(k.strip().replace("\"", "\\\""))
+ escaped_string = escape_string(k.strip())
copyright_body += "\t\"" + escaped_string
about_tp_file += "\t" + file_body + "\",\n"
@@ -343,7 +343,7 @@ def make_license_header(target, source, env):
for j in i[1].split("\n"):
if body != "":
body += "\\n\"\n"
- escaped_string = escape_string(j.strip().replace("\"", "\\\""))
+ escaped_string = escape_string(j.strip())
body += "\t\"" + escaped_string
about_license_name += "\t\"" + i[0] + "\",\n"
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 5e66488afb..477d440f28 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -1278,7 +1278,11 @@ void ScriptEditor::_members_overview_selected(int p_idx) {
if (!se) {
return;
}
- se->goto_line(members_overview->get_item_metadata(p_idx));
+ Dictionary state;
+ state["scroll_position"] = members_overview->get_item_metadata(p_idx);
+ state["column"] = 0;
+ state["row"] = members_overview->get_item_metadata(p_idx);
+ se->set_edit_state(state);
se->ensure_focus();
}
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index a24856dad7..adf65c11e1 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -529,9 +529,9 @@ void ScriptTextEditor::ensure_focus() {
void ScriptTextEditor::set_edit_state(const Variant &p_state) {
Dictionary state = p_state;
- code_editor->get_text_edit()->set_v_scroll(state["scroll_position"]);
code_editor->get_text_edit()->cursor_set_column(state["column"]);
code_editor->get_text_edit()->cursor_set_line(state["row"]);
+ code_editor->get_text_edit()->set_v_scroll(state["scroll_position"]);
code_editor->get_text_edit()->grab_focus();
//int scroll_pos;