1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 03:27:24 +08:00

Fix incorrect ordering of ApplyDefaults for newly added objects

This commit is contained in:
Dean Herbert 2020-09-11 19:54:11 +09:00
parent 8bae00454e
commit 8e028dd88f

View File

@ -79,11 +79,11 @@ namespace osu.Game.Screens.Edit
private void updateHitObject([CanBeNull] HitObject hitObject, bool silent)
{
scheduledUpdate?.Cancel();
if (hitObject != null)
pendingUpdates.Add(hitObject);
if (scheduledUpdate?.Completed == false) return;
scheduledUpdate = Schedule(() =>
{
beatmapProcessor?.PreProcess();
@ -158,10 +158,14 @@ namespace osu.Game.Screens.Edit
{
trackStartTime(hitObject);
mutableHitObjects.Insert(index, hitObject);
HitObjectAdded?.Invoke(hitObject);
updateHitObject(hitObject, true);
// must occur after the batch-scheduled ApplyDefaults.
Schedule(() =>
{
mutableHitObjects.Insert(index, hitObject);
HitObjectAdded?.Invoke(hitObject);
});
}
/// <summary>