Skip to content

Commit

Permalink
Fix phantom beatmap sets appearing on carousel after delete/update
Browse files Browse the repository at this point in the history
Regressed in c40c705.

As it turns out, `item.Item.Filtered.Value` is not the only condition
that should be checked to determine if a carousel item should be hidden
or not - `item.Item.State.Value != CarouselItemState.Collapsed` should
also be true. This was even available as the `item.Item.Visible`
convenience property, which is used in this commit.

Failing to check `item.Item.State.Value` led to setting non-zero alpha
on collapsed carousel items, leading to phantom beatmap sets appearing,
as the alpha was set in the entire carousel's `Update()` method, thus
firing every frame.
  • Loading branch information
bdach authored and peppy committed Nov 23, 2022
1 parent d903861 commit e65dc23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion osu.Game/Screens/Select/BeatmapCarousel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ protected override void Update()
{
updateItem(item);

if (!item.Item.Filtered.Value)
if (item.Item.Visible)
{
bool isSelected = item.Item.State.Value == CarouselItemState.Selected;

Expand Down

0 comments on commit e65dc23

Please sign in to comment.