1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 09:22:54 +08:00

Fix song select reverting to first difficulty of current group on entering

This commit is contained in:
Dean Herbert 2017-05-17 17:15:25 +09:00
parent cab12ee55a
commit 7bb38e927b

View File

@ -107,6 +107,8 @@ namespace osu.Game.Screens.Select
return; return;
} }
if (beatmap == SelectedBeatmap) return;
foreach (BeatmapGroup group in groups) foreach (BeatmapGroup group in groups)
{ {
var panel = group.BeatmapPanels.FirstOrDefault(p => p.Beatmap.Equals(beatmap)); var panel = group.BeatmapPanels.FirstOrDefault(p => p.Beatmap.Equals(beatmap));
@ -204,7 +206,7 @@ namespace osu.Game.Screens.Select
if (selectedGroup == null || selectedGroup.State == BeatmapGroupState.Hidden) if (selectedGroup == null || selectedGroup.State == BeatmapGroupState.Hidden)
SelectNext(); SelectNext();
else else
selectGroup(selectedGroup); selectGroup(selectedGroup, selectedPanel);
}; };
filterTask?.Cancel(); filterTask?.Cancel();
@ -339,6 +341,8 @@ namespace osu.Game.Screens.Select
selectedGroup.State = BeatmapGroupState.Collapsed; selectedGroup.State = BeatmapGroupState.Collapsed;
group.State = BeatmapGroupState.Expanded; group.State = BeatmapGroupState.Expanded;
group.SelectedPanel = panel;
panel.State = PanelSelectedState.Selected; panel.State = PanelSelectedState.Selected;
if (selectedPanel == panel) return; if (selectedPanel == panel) return;