You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Load fallback icon for custom class when no icon available
This commit is contained in:
@@ -4128,8 +4128,11 @@ Ref<Texture2D> EditorNode::get_class_icon(const String &p_class, const String &p
|
|||||||
// We've reached a native class, use its icon.
|
// We've reached a native class, use its icon.
|
||||||
String base_type;
|
String base_type;
|
||||||
script->get_language()->get_global_class_name(script->get_path(), &base_type);
|
script->get_language()->get_global_class_name(script->get_path(), &base_type);
|
||||||
|
if (gui_base->has_theme_icon(base_type, "EditorIcons")) {
|
||||||
return gui_base->get_theme_icon(base_type, "EditorIcons");
|
return gui_base->get_theme_icon(base_type, "EditorIcons");
|
||||||
}
|
}
|
||||||
|
return gui_base->get_theme_icon(p_fallback, "EditorIcons");
|
||||||
|
}
|
||||||
script = base_script;
|
script = base_script;
|
||||||
class_name = EditorNode::get_editor_data().script_class_get_name(script->get_path());
|
class_name = EditorNode::get_editor_data().script_class_get_name(script->get_path());
|
||||||
} while (class_name.is_empty());
|
} while (class_name.is_empty());
|
||||||
|
|||||||
Reference in New Issue
Block a user