diff --git a/osu.Game/Graphics/Carousel/Carousel.cs b/osu.Game/Graphics/Carousel/Carousel.cs index 1277dc993f..a9655aab56 100644 --- a/osu.Game/Graphics/Carousel/Carousel.cs +++ b/osu.Game/Graphics/Carousel/Carousel.cs @@ -356,13 +356,11 @@ namespace osu.Game.Graphics.Carousel { switch (e.Key) { - // this is a special hard-coded case to allow activating item with modifier keys pressed - // (e.g. press Ctrl+Enter to start beatmap with autoplay mod selected). - // We can't rely on GlobalAction.Select as it only responds to pressing the key without any modifiers. + // this is a special hard-coded case; we can't rely on OnPressed as GlobalActionContainer is + // matching with exact modifier consideration (so Ctrl+Enter would be ignored). case Key.Enter: case Key.KeypadEnter: - if (currentKeyboardSelection.CarouselItem != null) - Activate(currentKeyboardSelection.CarouselItem); + activateSelection(); return true; } @@ -374,8 +372,7 @@ namespace osu.Game.Graphics.Carousel switch (e.Action) { case GlobalAction.Select: - if (currentKeyboardSelection.CarouselItem != null) - Activate(currentKeyboardSelection.CarouselItem); + activateSelection(); return true; case GlobalAction.SelectNext: @@ -402,6 +399,12 @@ namespace osu.Game.Graphics.Carousel { } + private void activateSelection() + { + if (currentKeyboardSelection.CarouselItem != null) + Activate(currentKeyboardSelection.CarouselItem); + } + private void traverseKeyboardSelection(int direction) { if (carouselItems == null || carouselItems.Count == 0) return; diff --git a/osu.Game/Screens/SelectV2/SoloSongSelect.cs b/osu.Game/Screens/SelectV2/SoloSongSelect.cs index 654d5fb78a..ac64052395 100644 --- a/osu.Game/Screens/SelectV2/SoloSongSelect.cs +++ b/osu.Game/Screens/SelectV2/SoloSongSelect.cs @@ -6,12 +6,10 @@ using System.Collections.Generic; using System.Linq; using osu.Framework.Allocation; using osu.Framework.Screens; -using osu.Game.Beatmaps; using osu.Game.Localisation; using osu.Game.Overlays; using osu.Game.Overlays.Notifications; using osu.Game.Rulesets.Mods; -using osu.Game.Screens.Edit; using osu.Game.Screens.Play; using osu.Game.Utils; @@ -19,20 +17,6 @@ namespace osu.Game.Screens.SelectV2 { public partial class SoloSongSelect : SongSelect { - [Resolved] - private BeatmapManager beatmaps { get; set; } = null!; - - /// - /// Opens beatmap editor with the given beatmap. - /// - public void Edit(BeatmapInfo beatmap) - { - // Forced refetch is important here to guarantee correct invalidation across all difficulties. - Beatmap.Value = beatmaps.GetWorkingBeatmap(beatmap, true); - - this.Push(new EditorLoader()); - } - private PlayerLoader? playerLoader; private IReadOnlyList? modsAtGameplayStart;