Merge pull request #91471 from aaronp64/filesystemdock_previews

Fix `FileSystemDock` thumbnails sometimes not displaying
This commit is contained in:
Rémi Verschelde 2024-05-11 12:38:15 +02:00
commit ea552e1067
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -776,7 +776,7 @@ void FileSystemDock::navigate_to_path(const String &p_path) {
}
void FileSystemDock::_file_list_thumbnail_done(const String &p_path, const Ref<Texture2D> &p_preview, const Ref<Texture2D> &p_small_preview, const Variant &p_udata) {
if ((file_list_vb->is_visible_in_tree() || current_path.trim_suffix("/") == p_path.get_base_dir()) && p_preview.is_valid()) {
if (p_preview.is_valid()) {
Array uarr = p_udata;
int idx = uarr[0];
String file = uarr[1];