diff --git a/osu.Game/Screens/OnlinePlay/DrawableRoomPlaylist.cs b/osu.Game/Screens/OnlinePlay/DrawableRoomPlaylist.cs index 8abdec9ade..5a1648c91f 100644 --- a/osu.Game/Screens/OnlinePlay/DrawableRoomPlaylist.cs +++ b/osu.Game/Screens/OnlinePlay/DrawableRoomPlaylist.cs @@ -165,7 +165,11 @@ protected sealed override OsuRearrangeableListItem CreateOsuDrawab { d.SelectedItem.BindTarget = SelectedItem; d.RequestDeletion = i => RequestDeletion?.Invoke(i); - d.RequestResults = i => RequestResults?.Invoke(i); + d.RequestResults = i => + { + SelectedItem.Value = i; + RequestResults?.Invoke(i); + }; d.RequestEdit = i => RequestEdit?.Invoke(i); d.AllowReordering = AllowReordering; d.AllowDeletion = AllowDeletion; diff --git a/osu.Game/Screens/OnlinePlay/DrawableRoomPlaylistItem.cs b/osu.Game/Screens/OnlinePlay/DrawableRoomPlaylistItem.cs index 8f405399a7..823f6ea308 100644 --- a/osu.Game/Screens/OnlinePlay/DrawableRoomPlaylistItem.cs +++ b/osu.Game/Screens/OnlinePlay/DrawableRoomPlaylistItem.cs @@ -118,8 +118,6 @@ public partial class DrawableRoomPlaylistItem : OsuRearrangeableListItem AllowReordering || AllowDeletion || !AllowSelection || SelectedItem.Value == Model; - public DrawableRoomPlaylistItem(PlaylistItem item) : base(item) { @@ -367,7 +365,7 @@ protected override Drawable CreateContent() AutoSizeAxes = Axes.Both, Margin = new MarginPadding { Left = 8, Right = 8 }, }, - mainFillFlow = new FillFlowContainer + mainFillFlow = new MainFlow(() => SelectedItem.Value == Model) { Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, @@ -670,5 +668,17 @@ public TooltipArea(OwnerAvatar avatar) public LocalisableString TooltipText => avatar.TooltipText; } } + + public partial class MainFlow : FillFlowContainer + { + private readonly Func isSelected; + + public override bool PropagatePositionalInputSubTree => isSelected(); + + public MainFlow(Func isSelected) + { + this.isSelected = isSelected; + } + } } }