Refactor editor icon retrieval

This commit is contained in:
willnationsdev
2018-09-02 16:40:51 -05:00
committed by Will Nations
parent 06c8b5a4ff
commit 5436abefe4
29 changed files with 192 additions and 252 deletions

View File

@ -231,11 +231,10 @@ void InspectorDock::_prepare_history() {
already.insert(id);
Ref<Texture> icon = get_icon("Object", "EditorIcons");
if (has_icon(obj->get_class(), "EditorIcons"))
icon = get_icon(obj->get_class(), "EditorIcons");
else
Ref<Texture> icon = EditorNode::get_singleton()->get_object_icon(obj, "");
if (icon.is_null()) {
icon = base_icon;
}
String text;
if (Object::cast_to<Resource>(obj)) {