From 388fcfb295084a5efd47becabb9380f4f3b808c7 Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Fri, 21 Jul 2017 13:13:53 +0300 Subject: [PATCH 1/3] Make BeatmapCarousel inherit from OsuScrollContainer --- osu.Game/Screens/Select/BeatmapCarousel.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/Select/BeatmapCarousel.cs b/osu.Game/Screens/Select/BeatmapCarousel.cs index b696d637e6..231d2de5de 100644 --- a/osu.Game/Screens/Select/BeatmapCarousel.cs +++ b/osu.Game/Screens/Select/BeatmapCarousel.cs @@ -18,10 +18,11 @@ using System.Threading.Tasks; using osu.Framework.Allocation; using osu.Framework.Threading; using osu.Framework.Configuration; +using osu.Game.Graphics.Containers; namespace osu.Game.Screens.Select { - internal class BeatmapCarousel : ScrollContainer + internal class BeatmapCarousel : OsuScrollContainer { public BeatmapInfo SelectedBeatmap => selectedPanel?.Beatmap; From 5d30efc0908f22f8cbc099ef73307fe4629f7fad Mon Sep 17 00:00:00 2001 From: tgi74000 Date: Mon, 24 Jul 2017 09:57:12 +0200 Subject: [PATCH 2/3] Do not trigger Random if no Beatmaps are imported --- osu.Game/Screens/Select/BeatmapCarousel.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/osu.Game/Screens/Select/BeatmapCarousel.cs b/osu.Game/Screens/Select/BeatmapCarousel.cs index 7f49109bd0..06ad7c1aa9 100644 --- a/osu.Game/Screens/Select/BeatmapCarousel.cs +++ b/osu.Game/Screens/Select/BeatmapCarousel.cs @@ -177,6 +177,9 @@ namespace osu.Game.Screens.Select public void SelectNextRandom() { + if (groups.Count == 0) + return; + randomSelectedBeatmaps.Push(new KeyValuePair(selectedGroup, selectedGroup.SelectedPanel)); var visibleGroups = getVisibleGroups(); From d0e99f0c95cc4101fb8b8246d13cce91e6b9864a Mon Sep 17 00:00:00 2001 From: tgi74000 Date: Mon, 24 Jul 2017 10:25:33 +0200 Subject: [PATCH 3/3] check removed beatmap being null, check promptdelete beatmap being default --- osu.Game/Screens/Select/BeatmapCarousel.cs | 3 +++ osu.Game/Screens/Select/SongSelect.cs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/Select/BeatmapCarousel.cs b/osu.Game/Screens/Select/BeatmapCarousel.cs index 06ad7c1aa9..d46d093263 100644 --- a/osu.Game/Screens/Select/BeatmapCarousel.cs +++ b/osu.Game/Screens/Select/BeatmapCarousel.cs @@ -313,6 +313,9 @@ namespace osu.Game.Screens.Select private void removeGroup(BeatmapGroup group) { + if (group == null) + return; + groups.Remove(group); panels.Remove(group.Header); foreach (var p in group.BeatmapPanels) diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs index 09fd22ecbe..b2311d6561 100644 --- a/osu.Game/Screens/Select/SongSelect.cs +++ b/osu.Game/Screens/Select/SongSelect.cs @@ -384,7 +384,7 @@ namespace osu.Game.Screens.Select private void promptDelete() { - if (Beatmap != null) + if (Beatmap != null && !Beatmap.IsDefault) dialogOverlay?.Push(new BeatmapDeleteDialog(Beatmap)); }