You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-14 13:41:12 +00:00
Load fallback icon for custom class when no icon available
(cherry picked from commit ba90778f1c)
This commit is contained in:
committed by
Rémi Verschelde
parent
25ef0aaf3e
commit
92256df9fb
@@ -4087,8 +4087,11 @@ Ref<Texture> EditorNode::get_class_icon(const String &p_class, const String &p_f
|
||||
// We've reached a native class, use its icon.
|
||||
String base_type;
|
||||
script->get_language()->get_global_class_name(script->get_path(), &base_type);
|
||||
if (gui_base->has_icon(base_type, "EditorIcons")) {
|
||||
return gui_base->get_icon(base_type, "EditorIcons");
|
||||
}
|
||||
return gui_base->get_icon(p_fallback, "EditorIcons");
|
||||
}
|
||||
script = base_script;
|
||||
class_name = EditorNode::get_editor_data().script_class_get_name(script->get_path());
|
||||
} while (class_name.empty());
|
||||
|
||||
Reference in New Issue
Block a user