Fix Cannot get class error when searching TextFile/OtherFile
This commit is contained in:
parent
d52b84e472
commit
1066e83262
1 changed files with 2 additions and 2 deletions
|
|
@ -274,7 +274,7 @@ void FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory
|
|||
List<FileInfo> 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<EditorFeatureProfile> profile = EditorFeatureProfileManager::get_singleton()->get_current_profile();
|
||||
if (profile.is_null()) {
|
||||
if (profile.is_null() || !ClassDB::class_exists(p_class)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue