Merge pull request #87790 from nongvantinh/fix-87643

Fix incorrect condition for error filtering
This commit is contained in:
Rémi Verschelde 2024-02-02 12:03:59 +01:00
commit 8a47d6eb50
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -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;
}
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 true;
return false;
}
private Color? GetProblemItemColor(BuildDiagnostic diagnostic)