mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 09:03:50 +09: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:
@ -11,6 +11,7 @@ using osu.Framework.Allocation;
|
|||||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Testing;
|
||||||
using osu.Framework.Utils;
|
using osu.Framework.Utils;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Configuration;
|
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]
|
[Test]
|
||||||
public void TestScrollPositionMaintainedOnDelete()
|
public void TestScrollPositionMaintainedOnDelete()
|
||||||
{
|
{
|
||||||
|
@ -770,7 +770,7 @@ namespace osu.Game.Screens.Select
|
|||||||
{
|
{
|
||||||
updateItem(item);
|
updateItem(item);
|
||||||
|
|
||||||
if (!item.Item.Filtered.Value)
|
if (item.Item.Visible)
|
||||||
{
|
{
|
||||||
bool isSelected = item.Item.State.Value == CarouselItemState.Selected;
|
bool isSelected = item.Item.State.Value == CarouselItemState.Selected;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user