You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Properly disambiguate unsaved scripts
(cherry picked from commit 3082def404)
This commit is contained in:
committed by
Rémi Verschelde
parent
abdcb7d299
commit
cea16907bb
@@ -1892,15 +1892,19 @@ void ScriptEditor::_update_script_names() {
|
|||||||
Vector<String> disambiguated_script_names;
|
Vector<String> disambiguated_script_names;
|
||||||
Vector<String> full_script_paths;
|
Vector<String> full_script_paths;
|
||||||
for (int j = 0; j < sedata.size(); j++) {
|
for (int j = 0; j < sedata.size(); j++) {
|
||||||
disambiguated_script_names.push_back(sedata[j].name);
|
disambiguated_script_names.push_back(sedata[j].name.replace("(*)", ""));
|
||||||
full_script_paths.push_back(sedata[j].tooltip);
|
full_script_paths.push_back(sedata[j].tooltip);
|
||||||
}
|
}
|
||||||
|
|
||||||
EditorNode::disambiguate_filenames(full_script_paths, disambiguated_script_names);
|
EditorNode::disambiguate_filenames(full_script_paths, disambiguated_script_names);
|
||||||
|
|
||||||
for (int j = 0; j < sedata.size(); j++) {
|
for (int j = 0; j < sedata.size(); j++) {
|
||||||
|
if (sedata[j].name.ends_with("(*)")) {
|
||||||
|
sedata.write[j].name = disambiguated_script_names[j] + "(*)";
|
||||||
|
} else {
|
||||||
sedata.write[j].name = disambiguated_script_names[j];
|
sedata.write[j].name = disambiguated_script_names[j];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
EditorHelp *eh = Object::cast_to<EditorHelp>(tab_container->get_child(i));
|
EditorHelp *eh = Object::cast_to<EditorHelp>(tab_container->get_child(i));
|
||||||
if (eh) {
|
if (eh) {
|
||||||
|
|||||||
Reference in New Issue
Block a user