Changed the name displayed in the Script tab for built-in script with a more descriptive one
This commit is contained in:
parent
dfd1331690
commit
375c94510f
1 changed files with 2 additions and 1 deletions
|
@ -1549,9 +1549,10 @@ void ScriptEditor::_update_script_names() {
|
||||||
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
|
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
|
||||||
if (se) {
|
if (se) {
|
||||||
|
|
||||||
String name = se->get_name();
|
|
||||||
Ref<Texture> icon = se->get_icon();
|
Ref<Texture> icon = se->get_icon();
|
||||||
String path = se->get_edited_script()->get_path();
|
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;
|
_ScriptEditorItemData sd;
|
||||||
sd.icon = icon;
|
sd.icon = icon;
|
||||||
|
|
Loading…
Reference in a new issue