Merge pull request #18930 from samdze/master

Changed the name displayed for built-in scripts in the Script tab with a more descriptive one
This commit is contained in:
Rémi Verschelde 2018-05-16 23:14:34 +02:00 committed by GitHub
commit a404ceb128
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1549,9 +1549,10 @@ void ScriptEditor::_update_script_names() {
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (se) {
String name = se->get_name();
Ref<Texture> icon = se->get_icon();
String path = se->get_edited_script()->get_path();
bool built_in = !path.is_resource_file();
String name = built_in ? path.get_file() : se->get_name();
_ScriptEditorItemData sd;
sd.icon = icon;