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

Merge pull request #25686 from peppy/fix-song-select-match

Fix searching at song select matching incorrect ruleset
This commit is contained in:
Bartłomiej Dach 2023-12-06 09:25:47 +01:00 committed by GitHub
commit 4585a169b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);