From 1066e8326246131a211620e259dd2cd7857e1f20 Mon Sep 17 00:00:00 2001 From: Jayden Sipe Date: Sun, 6 Apr 2025 20:51:40 -0400 Subject: [PATCH] Fix `Cannot get class` error when searching `TextFile`/`OtherFile` --- editor/filesystem_dock.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 8a950d5bdc..345744e19b 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -274,7 +274,7 @@ void FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory List file_list; for (int i = 0; i < p_dir->get_file_count(); i++) { String file_type = p_dir->get_file_type(i); - if (file_type != "TextFile" && file_type != "OtherFile" && _is_file_type_disabled_by_feature_profile(file_type)) { + if (_is_file_type_disabled_by_feature_profile(file_type)) { // If type is disabled, file won't be displayed. continue; } @@ -848,7 +848,7 @@ void FileSystemDock::_set_file_display(bool p_active) { bool FileSystemDock::_is_file_type_disabled_by_feature_profile(const StringName &p_class) { Ref profile = EditorFeatureProfileManager::get_singleton()->get_current_profile(); - if (profile.is_null()) { + if (profile.is_null() || !ClassDB::class_exists(p_class)) { return false; }