Merge pull request #97421 from SaNeOr/fix#97387
Fix GDExtension classes inheriting from Resource not using icons in FileSystem
This commit is contained in:
commit
841061d50e
|
@ -1977,6 +1977,10 @@ void EditorFileSystem::_update_file_icon_path(EditorFileSystemDirectory::FileInf
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (icon_path.is_empty() && !file_info->type.is_empty()) {
|
||||||
|
icon_path = EditorNode::get_singleton()->get_class_icon(file_info->type)->get_path();
|
||||||
|
}
|
||||||
|
|
||||||
file_info->icon_path = icon_path;
|
file_info->icon_path = icon_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2327,7 +2331,7 @@ void EditorFileSystem::update_files(const Vector<String> &p_script_paths) {
|
||||||
_queue_update_scene_groups(file);
|
_queue_update_scene_groups(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fs->files[cpos]->type == SNAME("Resource")) {
|
if (ClassDB::is_parent_class(fs->files[cpos]->type, SNAME("Resource"))) {
|
||||||
files_to_update_icon_path.push_back(fs->files[cpos]);
|
files_to_update_icon_path.push_back(fs->files[cpos]);
|
||||||
} else if (old_script_class_icon_path != fs->files[cpos]->script_class_icon_path) {
|
} else if (old_script_class_icon_path != fs->files[cpos]->script_class_icon_path) {
|
||||||
update_files_icon_cache = true;
|
update_files_icon_cache = true;
|
||||||
|
|
Loading…
Reference in New Issue