diff options
author | Tomasz Chabora <kobewi4e@gmail.com> | 2020-07-31 22:43:40 +0200 |
---|---|---|
committer | Tomasz Chabora <kobewi4e@gmail.com> | 2020-07-31 22:43:40 +0200 |
commit | 3082def404091bce1acaa53226c514d105ddf8d1 (patch) | |
tree | 24c2e076c7a8bcfa49735e9c9807fb09093b45fe /editor/plugins/script_editor_plugin.cpp | |
parent | be435608b0b1bb6ff3de10009ade5ec2017016d8 (diff) |
Properly disambiguate unsaved scripts
Diffstat (limited to 'editor/plugins/script_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 6c7f4eb908..20eef1cebd 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -1922,14 +1922,18 @@ void ScriptEditor::_update_script_names() { Vector<String> disambiguated_script_names; Vector<String> full_script_paths; for (int j = 0; j < sedata.size(); j++) { - disambiguated_script_names.append(sedata[j].name); + disambiguated_script_names.append(sedata[j].name.replace("(*)", "")); full_script_paths.append(sedata[j].tooltip); } EditorNode::disambiguate_filenames(full_script_paths, disambiguated_script_names); for (int j = 0; j < sedata.size(); j++) { - sedata.write[j].name = disambiguated_script_names[j]; + if (sedata[j].name.ends_with("(*)")) { + sedata.write[j].name = disambiguated_script_names[j] + "(*)"; + } else { + sedata.write[j].name = disambiguated_script_names[j]; + } } EditorHelp *eh = Object::cast_to<EditorHelp>(tab_container->get_child(i)); |