Merge pull request #8359 from volzhs/script-filename-master

Show script filename instead of thumbnail
This commit is contained in:
Rémi Verschelde 2017-04-20 02:09:21 +02:00 committed by GitHub
commit 367f21e123

View file

@ -2431,7 +2431,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());
}
@ -3649,7 +3651,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());
}