From 1bb7d412daf2ad534dcb3a09161f459fb698e535 Mon Sep 17 00:00:00 2001 From: Naxess <30292137+Naxesss@users.noreply.github.com> Date: Wed, 12 May 2021 01:29:46 +0200 Subject: [PATCH] Add `IssueList` filtering based on those bindables --- osu.Game/Screens/Edit/Verify/IssueList.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/osu.Game/Screens/Edit/Verify/IssueList.cs b/osu.Game/Screens/Edit/Verify/IssueList.cs index dd1dffcb42..7a2202c198 100644 --- a/osu.Game/Screens/Edit/Verify/IssueList.cs +++ b/osu.Game/Screens/Edit/Verify/IssueList.cs @@ -102,9 +102,22 @@ namespace osu.Game.Screens.Edit.Verify if (rulesetVerifier != null) issues = issues.Concat(rulesetVerifier.Run(beatmap, workingBeatmap.Value)); + issues = filter(issues); + table.Issues = issues .OrderBy(issue => issue.Template.Type) .ThenBy(issue => issue.Check.Metadata.Category); } + + private IEnumerable filter(IEnumerable issues) + { + foreach (IssueType issueType in ShowType.Keys) + { + if (!ShowType[issueType].Value) + issues = issues.Where(issue => issue.Template.Type != issueType); + } + + return issues; + } } }