mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 16:27:26 +08:00
Fix CollectionManager
opening file multiple times across test scene
This commit is contained in:
parent
a85a70c472
commit
be69514002
@ -39,6 +39,8 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
{
|
{
|
||||||
public class TestSceneDrawableRoomPlaylist : MultiplayerTestScene
|
public class TestSceneDrawableRoomPlaylist : MultiplayerTestScene
|
||||||
{
|
{
|
||||||
|
protected override Container<Drawable> Content { get; } = new Container { RelativeSizeAxes = Axes.Both };
|
||||||
|
|
||||||
private TestPlaylist playlist;
|
private TestPlaylist playlist;
|
||||||
|
|
||||||
private BeatmapManager manager;
|
private BeatmapManager manager;
|
||||||
@ -54,6 +56,14 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
Dependencies.Cache(rulesets = new RealmRulesetStore(Realm));
|
Dependencies.Cache(rulesets = new RealmRulesetStore(Realm));
|
||||||
Dependencies.Cache(manager = new BeatmapManager(LocalStorage, Realm, rulesets, null, audio, Resources, host, Beatmap.Default));
|
Dependencies.Cache(manager = new BeatmapManager(LocalStorage, Realm, rulesets, null, audio, Resources, host, Beatmap.Default));
|
||||||
Dependencies.Cache(Realm);
|
Dependencies.Cache(Realm);
|
||||||
|
|
||||||
|
base.Content.AddRange(new Drawable[]
|
||||||
|
{
|
||||||
|
collections = new CollectionManager(LocalStorage),
|
||||||
|
Content
|
||||||
|
});
|
||||||
|
|
||||||
|
Dependencies.Cache(collections);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
@ -466,12 +476,10 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
CachedDependencies = new (Type, object)[]
|
CachedDependencies = new (Type, object)[]
|
||||||
{
|
{
|
||||||
(typeof(BeatmapSetOverlay), beatmapOverlay = new BeatmapSetOverlay()),
|
(typeof(BeatmapSetOverlay), beatmapOverlay = new BeatmapSetOverlay()),
|
||||||
(typeof(CollectionManager), collections = new CollectionManager(LocalStorage)),
|
|
||||||
(typeof(ManageCollectionsDialog), manageCollectionsDialog = new ManageCollectionsDialog()),
|
(typeof(ManageCollectionsDialog), manageCollectionsDialog = new ManageCollectionsDialog()),
|
||||||
},
|
},
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
collections,
|
|
||||||
new OsuContextMenuContainer
|
new OsuContextMenuContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Loading…
Reference in New Issue
Block a user