1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Don't grab theme icons for scripts

This commit is contained in:
kobewi
2023-07-08 15:03:54 +02:00
parent f8dbed4d0a
commit 51f92d1100
3 changed files with 13 additions and 12 deletions

View File

@@ -1154,15 +1154,6 @@ Ref<Texture2D> EditorData::get_script_icon(const Ref<Script> &p_script) {
return ext_icon;
}
// Look for the base type in the editor theme.
// This is only relevant for built-in classes.
const Control *gui_base = EditorNode::get_singleton()->get_gui_base();
if (gui_base && gui_base->has_theme_icon(base_type, SNAME("EditorIcons"))) {
Ref<Texture2D> theme_icon = gui_base->get_theme_icon(base_type, SNAME("EditorIcons"));
_script_icon_cache[p_script] = theme_icon;
return theme_icon;
}
// If no icon found, cache it as null.
_script_icon_cache[p_script] = Ref<Texture>();
return nullptr;