浏览代码

Merge pull request #87790 from nongvantinh/fix-87643

Fix incorrect condition for error filtering
Rémi Verschelde 1 年之前
父节点
当前提交
8a47d6eb50
共有 1 个文件被更改,包括 8 次插入8 次删除
  1. 8 8
      modules/mono/editor/GodotTools/GodotTools/Build/BuildProblemsView.cs

+ 8 - 8
modules/mono/editor/GodotTools/GodotTools/Build/BuildProblemsView.cs

@@ -308,14 +308,14 @@ namespace GodotTools.Build
                 return false;
 
             string searchText = _searchBox.Text;
-            if (!string.IsNullOrEmpty(searchText) &&
-                (!diagnostic.Message.Contains(searchText, StringComparison.OrdinalIgnoreCase) ||
-                !(diagnostic.File?.Contains(searchText, StringComparison.OrdinalIgnoreCase) ?? false)))
-            {
-                return false;
-            }
-
-            return true;
+            if (string.IsNullOrEmpty(searchText))
+                return true;
+            if (diagnostic.Message.Contains(searchText, StringComparison.OrdinalIgnoreCase))
+                return true;
+            if (diagnostic.File?.Contains(searchText, StringComparison.OrdinalIgnoreCase) ?? false)
+                return true;
+
+            return false;
         }
 
         private Color? GetProblemItemColor(BuildDiagnostic diagnostic)