mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 14:57:52 +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)
|
private void updateHitObject([CanBeNull] HitObject hitObject, bool silent)
|
||||||
{
|
{
|
||||||
scheduledUpdate?.Cancel();
|
|
||||||
|
|
||||||
if (hitObject != null)
|
if (hitObject != null)
|
||||||
pendingUpdates.Add(hitObject);
|
pendingUpdates.Add(hitObject);
|
||||||
|
|
||||||
|
if (scheduledUpdate?.Completed == false) return;
|
||||||
|
|
||||||
scheduledUpdate = Schedule(() =>
|
scheduledUpdate = Schedule(() =>
|
||||||
{
|
{
|
||||||
beatmapProcessor?.PreProcess();
|
beatmapProcessor?.PreProcess();
|
||||||
@ -158,10 +158,14 @@ namespace osu.Game.Screens.Edit
|
|||||||
{
|
{
|
||||||
trackStartTime(hitObject);
|
trackStartTime(hitObject);
|
||||||
|
|
||||||
mutableHitObjects.Insert(index, hitObject);
|
|
||||||
|
|
||||||
HitObjectAdded?.Invoke(hitObject);
|
|
||||||
updateHitObject(hitObject, true);
|
updateHitObject(hitObject, true);
|
||||||
|
|
||||||
|
// must occur after the batch-scheduled ApplyDefaults.
|
||||||
|
Schedule(() =>
|
||||||
|
{
|
||||||
|
mutableHitObjects.Insert(index, hitObject);
|
||||||
|
HitObjectAdded?.Invoke(hitObject);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user