mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 10:12:54 +08:00
Merge pull request #26127 from ntransw/fix-rewind-backtracking
Fix rewind incorrectly selecting the same beatmap
This commit is contained in:
commit
4077d3a259
@ -454,6 +454,23 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
AddStep("Un-filter", () => carousel.Filter(new FilterCriteria(), false));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRewind()
|
||||
{
|
||||
const int local_set_count = 3;
|
||||
const int random_select_count = local_set_count * 3;
|
||||
loadBeatmaps(setCount: local_set_count);
|
||||
|
||||
for (int i = 0; i < random_select_count; i++)
|
||||
nextRandom();
|
||||
|
||||
for (int i = 0; i < random_select_count; i++)
|
||||
{
|
||||
prevRandom();
|
||||
AddAssert("correct random last selected", () => selectedSets.Peek(), () => Is.EqualTo(carousel.SelectedBeatmapSet));
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRewindToDeletedBeatmap()
|
||||
{
|
||||
|
@ -643,7 +643,7 @@ namespace osu.Game.Screens.Select
|
||||
while (randomSelectedBeatmaps.Any())
|
||||
{
|
||||
var beatmap = randomSelectedBeatmaps[^1];
|
||||
randomSelectedBeatmaps.Remove(beatmap);
|
||||
randomSelectedBeatmaps.RemoveAt(randomSelectedBeatmaps.Count - 1);
|
||||
|
||||
if (!beatmap.Filtered.Value && beatmap.BeatmapInfo.BeatmapSet?.DeletePending != true)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user