mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 17:02:55 +08:00
Fix stackoverflow
This commit is contained in:
parent
5ebead2bfd
commit
02a908752f
@ -224,7 +224,6 @@ namespace osu.Game.Screens.Select
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
beatmaps.CollectionChanged += filterBeatmapsChanged;
|
||||
Current.BindValueChanged(filterChanged, true);
|
||||
}
|
||||
|
||||
@ -247,11 +246,15 @@ namespace osu.Game.Screens.Select
|
||||
/// </summary>
|
||||
private void filterChanged(ValueChangedEvent<CollectionFilter> filter)
|
||||
{
|
||||
beatmaps.CollectionChanged -= filterBeatmapsChanged;
|
||||
|
||||
if (filter.OldValue?.Collection != null)
|
||||
beatmaps.UnbindFrom(filter.OldValue.Collection.Beatmaps);
|
||||
|
||||
if (filter.NewValue?.Collection != null)
|
||||
beatmaps.BindTo(filter.NewValue.Collection.Beatmaps);
|
||||
|
||||
beatmaps.CollectionChanged += filterBeatmapsChanged;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user