diff options
-rw-r--r-- | editor/property_editor.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index 86136fa78b..9a2ba1e6fc 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -2427,7 +2427,9 @@ void PropertyEditor::set_item_text(TreeItem *p_item, int p_type, const String &p } } - if (!res->is_class("Texture")) { + if (res->is_class("Script")) { + p_item->set_text(1, res->get_path().get_file()); + } else if (!res->is_class("Texture")) { //texture already previews via itself EditorResourcePreview::get_singleton()->queue_edited_resource_preview(res, this, "_resource_preview_done", p_item->get_instance_ID()); } @@ -3641,7 +3643,9 @@ void PropertyEditor::update_tree() { } else if (res.is_valid()) { item->set_tooltip(1, res->get_name() + " (" + res->get_class() + ")"); } - if (!res->is_class("Texture")) { + if (res->is_class("Script")) { + item->set_text(1, res->get_path().get_file()); + } else if (!res->is_class("Texture")) { //texture already previews via itself EditorResourcePreview::get_singleton()->queue_edited_resource_preview(res, this, "_resource_preview_done", item->get_instance_ID()); } |