Skip to content

Commit e4cf4fc

Browse files
committed
fix GDExtension classes inheriting from Resource are not using icons in FileSystem
1 parent 83d54ab commit e4cf4fc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

editor/editor_file_system.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1872,6 +1872,10 @@ void EditorFileSystem::_update_file_icon_path(EditorFileSystemDirectory::FileInf
18721872
}
18731873
}
18741874

1875+
if (icon_path.is_empty() && !file_info->type.is_empty()) {
1876+
icon_path = EditorNode::get_singleton()->get_class_icon(file_info->type)->get_path();
1877+
}
1878+
18751879
file_info->icon_path = icon_path;
18761880
}
18771881

@@ -2191,7 +2195,7 @@ void EditorFileSystem::update_files(const Vector<String> &p_script_paths) {
21912195
_queue_update_scene_groups(file);
21922196
}
21932197

2194-
if (fs->files[cpos]->type == SNAME("Resource")) {
2198+
if (ClassDB::is_parent_class(fs->files[cpos]->type, SNAME("Resource"))) {
21952199
files_to_update_icon_path.push_back(fs->files[cpos]);
21962200
} else if (old_script_class_icon_path != fs->files[cpos]->script_class_icon_path) {
21972201
update_files_icon_cache = true;

0 commit comments

Comments
 (0)