mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 08:22:56 +08:00
Merge pull request #842 from MrTheMake/songselect-fix
Fix song select scheduled beatmap change task not being canceled
This commit is contained in:
commit
a22e11df03
@ -170,8 +170,8 @@ namespace osu.Game.Screens.Select
|
||||
List<BeatmapGroup> visibleGroups = groups.Where(selectGroup => selectGroup.State != BeatmapGroupState.Hidden).ToList();
|
||||
if (visibleGroups.Count < 1)
|
||||
return;
|
||||
BeatmapGroup group = visibleGroups[RNG.Next(visibleGroups.Count)];
|
||||
|
||||
BeatmapGroup group = visibleGroups[RNG.Next(visibleGroups.Count)];
|
||||
BeatmapPanel panel = group.BeatmapPanels[RNG.Next(group.BeatmapPanels.Count)];
|
||||
|
||||
selectGroup(group, panel);
|
||||
|
@ -316,11 +316,12 @@ namespace osu.Game.Screens.Select
|
||||
/// </summary>
|
||||
private void selectionChanged(BeatmapInfo beatmap)
|
||||
{
|
||||
bool beatmapSetChange = false;
|
||||
selectionChangedDebounce?.Cancel();
|
||||
|
||||
if (beatmap.Equals(Beatmap?.BeatmapInfo))
|
||||
return;
|
||||
|
||||
bool beatmapSetChange = false;
|
||||
if (beatmap.BeatmapSetInfoID == selectionChangeNoBounce?.BeatmapSetInfoID)
|
||||
sampleChangeDifficulty.Play();
|
||||
else
|
||||
@ -331,7 +332,6 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
selectionChangeNoBounce = beatmap;
|
||||
|
||||
selectionChangedDebounce?.Cancel();
|
||||
selectionChangedDebounce = Scheduler.AddDelayed(delegate
|
||||
{
|
||||
Beatmap = database.GetWorkingBeatmap(beatmap, Beatmap);
|
||||
|
Loading…
Reference in New Issue
Block a user