mirror of
https://github.com/ppy/osu.git
synced 2025-03-15 01:27:20 +08:00
Fix potential crash from cross-thread drawable manipulation in CollectionFilterDropdown
This commit is contained in:
parent
e30fb72ee2
commit
90dce52042
@ -41,19 +41,18 @@ namespace osu.Game.Collections
|
|||||||
ItemSource = filters;
|
ItemSource = filters;
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader(permitNulls: true)]
|
[Resolved(CanBeNull = true)]
|
||||||
private void load([CanBeNull] CollectionManager collectionManager)
|
private CollectionManager collectionManager { get; set; }
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
|
||||||
if (collectionManager != null)
|
if (collectionManager != null)
|
||||||
collections.BindTo(collectionManager.Collections);
|
collections.BindTo(collectionManager.Collections);
|
||||||
|
|
||||||
collections.CollectionChanged += (_, __) => collectionsChanged();
|
collections.CollectionChanged += (_, __) => collectionsChanged();
|
||||||
collectionsChanged();
|
collectionsChanged();
|
||||||
}
|
|
||||||
|
|
||||||
protected override void LoadComplete()
|
|
||||||
{
|
|
||||||
base.LoadComplete();
|
|
||||||
|
|
||||||
Current.BindValueChanged(filterChanged, true);
|
Current.BindValueChanged(filterChanged, true);
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ namespace osu.Game.Screens.Select
|
|||||||
Sort = sortMode.Value,
|
Sort = sortMode.Value,
|
||||||
AllowConvertedBeatmaps = showConverted.Value,
|
AllowConvertedBeatmaps = showConverted.Value,
|
||||||
Ruleset = ruleset.Value,
|
Ruleset = ruleset.Value,
|
||||||
Collection = collectionDropdown?.Current.Value.Collection
|
Collection = collectionDropdown?.Current.Value?.Collection
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!minimumStars.IsDefault)
|
if (!minimumStars.IsDefault)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user