summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-05-16 23:14:34 +0200
committerGitHub <noreply@github.com>2018-05-16 23:14:34 +0200
commita404ceb1284e1e366750cb678ab7f73f4cdc5ac3 (patch)
tree33349957ab7bad6eb2bfdaf3722471a55873e0ce
parent0888f75c25f09626a768d928215286ccf9cd9159 (diff)
parent375c94510f529af4513e552a9c9610d22fddad8a (diff)
Merge pull request #18930 from samdze/master
Changed the name displayed for built-in scripts in the Script tab with a more descriptive one
-rw-r--r--editor/plugins/script_editor_plugin.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index ac250f085d..c0f91455fa 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -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;