diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-09-14 17:24:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-14 17:24:04 +0200 |
commit | 5961a6da03e70dbfa811c30c4ec684d3a7746bf6 (patch) | |
tree | 8c5eb977e7a417f978e1ef39b9f3cacd4397e799 /editor/inspector_dock.cpp | |
parent | 2aad7f1376897a6cb57471d03169507fac178b42 (diff) | |
parent | 5436abefe4f40eb84f96c36ae372df39ec4295d7 (diff) |
Merge pull request #21717 from willnationsdev/edicon-refactor
Refactor editor icon retrieval
Diffstat (limited to 'editor/inspector_dock.cpp')
-rw-r--r-- | editor/inspector_dock.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp index 7aad973a96..5ab764fb15 100644 --- a/editor/inspector_dock.cpp +++ b/editor/inspector_dock.cpp @@ -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)) { |