Skip to content

Commit 841061d

Browse files
committed
Merge pull request #97421 from SaNeOr/fix#97387
Fix GDExtension classes inheriting from Resource not using icons in FileSystem
2 parents 2912cb9 + e4cf4fc commit 841061d

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
@@ -1977,6 +1977,10 @@ void EditorFileSystem::_update_file_icon_path(EditorFileSystemDirectory::FileInf
19771977
}
19781978
}
19791979

1980+
if (icon_path.is_empty() && !file_info->type.is_empty()) {
1981+
icon_path = EditorNode::get_singleton()->get_class_icon(file_info->type)->get_path();
1982+
}
1983+
19801984
file_info->icon_path = icon_path;
19811985
}
19821986

@@ -2327,7 +2331,7 @@ void EditorFileSystem::update_files(const Vector<String> &p_script_paths) {
23272331
_queue_update_scene_groups(file);
23282332
}
23292333

2330-
if (fs->files[cpos]->type == SNAME("Resource")) {
2334+
if (ClassDB::is_parent_class(fs->files[cpos]->type, SNAME("Resource"))) {
23312335
files_to_update_icon_path.push_back(fs->files[cpos]);
23322336
} else if (old_script_class_icon_path != fs->files[cpos]->script_class_icon_path) {
23332337
update_files_icon_cache = true;

0 commit comments

Comments
 (0)