mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 15:07:44 +08:00
Remove secondary schedule logic
This commit is contained in:
parent
81f30cd264
commit
3854caae9b
@ -77,7 +77,7 @@ namespace osu.Game.Screens.Edit
|
||||
/// <param name="hitObject">The <see cref="HitObject"/> to update.</param>
|
||||
public void UpdateHitObject([NotNull] HitObject hitObject) => updateHitObject(hitObject, false);
|
||||
|
||||
private void updateHitObject([CanBeNull] HitObject hitObject, bool silent)
|
||||
private void updateHitObject([CanBeNull] HitObject hitObject, bool silent, bool performAdd = false)
|
||||
{
|
||||
if (hitObject != null)
|
||||
pendingUpdates.Add(hitObject);
|
||||
@ -93,6 +93,12 @@ namespace osu.Game.Screens.Edit
|
||||
|
||||
beatmapProcessor?.PostProcess();
|
||||
|
||||
if (performAdd)
|
||||
{
|
||||
foreach (var obj in pendingUpdates)
|
||||
HitObjectAdded?.Invoke(obj);
|
||||
}
|
||||
|
||||
if (!silent)
|
||||
{
|
||||
foreach (var obj in pendingUpdates)
|
||||
@ -158,14 +164,8 @@ namespace osu.Game.Screens.Edit
|
||||
{
|
||||
trackStartTime(hitObject);
|
||||
|
||||
updateHitObject(hitObject, true);
|
||||
|
||||
// must occur after the batch-scheduled ApplyDefaults.
|
||||
Schedule(() =>
|
||||
{
|
||||
mutableHitObjects.Insert(index, hitObject);
|
||||
HitObjectAdded?.Invoke(hitObject);
|
||||
});
|
||||
mutableHitObjects.Insert(index, hitObject);
|
||||
updateHitObject(hitObject, true, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user