mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 03:25:11 +08:00
Merge pull request #21326 from bdach/fix-phantom-beatmap-sets
Fix phantom beatmap sets appearing on carousel after delete/update
This commit is contained in:
commit
dfa92b3de9
@ -11,6 +11,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Framework.Utils;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Configuration;
|
||||
@ -118,6 +119,15 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestDeletion()
|
||||
{
|
||||
loadBeatmaps(count: 5, randomDifficulties: true);
|
||||
|
||||
AddStep("remove first set", () => carousel.RemoveBeatmapSet(carousel.Items.Select(item => item.Item).OfType<CarouselBeatmapSet>().First().BeatmapSet));
|
||||
AddUntilStep("4 beatmap sets visible", () => this.ChildrenOfType<DrawableCarouselBeatmapSet>().Count(set => set.Alpha > 0) == 4);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestScrollPositionMaintainedOnDelete()
|
||||
{
|
||||
|
@ -770,7 +770,7 @@ namespace osu.Game.Screens.Select
|
||||
{
|
||||
updateItem(item);
|
||||
|
||||
if (!item.Item.Filtered.Value)
|
||||
if (item.Item.Visible)
|
||||
{
|
||||
bool isSelected = item.Item.State.Value == CarouselItemState.Selected;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user