1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 16:52:54 +08:00

Make sure that composerContainer is cleared for testing purposes

This commit is contained in:
smoogipoo 2017-11-30 14:00:17 +09:00
parent a7a9569aee
commit abd6125691

View File

@ -82,6 +82,8 @@ namespace osu.Game.Screens.Edit.Screens.Compose
private void beatmapChanged(WorkingBeatmap newBeatmap)
{
composerContainer.Clear();
var ruleset = newBeatmap.BeatmapInfo.Ruleset?.CreateInstance();
var composer = ruleset?.CreateHitObjectComposer();
if (composer == null)
@ -91,7 +93,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose
return;
}
composerContainer.Add(composer);
composerContainer.Child = composer;
composerContainer.Clock = new InterpolatingFramedClock((IAdjustableClock)newBeatmap.Track ?? new StopwatchClock());
}
}