mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 15:07:44 +08:00
Fix incorrect ordering of ApplyDefaults for newly added objects
This commit is contained in:
parent
8bae00454e
commit
8e028dd88f
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user