1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 23:12:56 +08:00

Fix searching at song select matching incorrect ruleset

Regressed with https://github.com/ppy/osu/pull/25679.
This commit is contained in:
Dean Herbert 2023-12-06 11:17:32 +09:00
parent 88095aaefa
commit 8286d3896f
No known key found for this signature in database
2 changed files with 20 additions and 0 deletions

View File

@ -580,6 +580,24 @@ namespace osu.Game.Tests.Visual.SongSelect
AddAssert("start not requested", () => !startRequested);
}
[Test]
public void TestSearchTextWithRulesetCriteria()
{
createSongSelect();
addRulesetImportStep(0);
AddStep("disallow convert display", () => config.SetValue(OsuSetting.ShowConvertedBeatmaps, false));
AddUntilStep("has selection", () => songSelect!.Carousel.SelectedBeatmapInfo != null);
AddStep("set filter to match all", () => songSelect!.FilterControl.CurrentTextSearch.Value = "Some");
changeRuleset(1);
AddUntilStep("has no selection", () => songSelect!.Carousel.SelectedBeatmapInfo == null);
}
[TestCase(false)]
[TestCase(true)]
public void TestExternalBeatmapChangeWhileFiltered(bool differentRuleset)

View File

@ -41,6 +41,8 @@ namespace osu.Game.Screens.Select.Carousel
return match;
}
if (!match) return false;
if (criteria.SearchTerms.Length > 0)
{
match = BeatmapInfo.Match(criteria.SearchTerms);