mirror of
https://github.com/ppy/osu.git
synced 2025-02-10 08:52:54 +08:00
Fix test failures due to on-the-fly starttime changes
This commit is contained in:
parent
974390bda7
commit
cf91962865
@ -57,6 +57,14 @@ namespace osu.Game.Rulesets.UI
|
|||||||
lifetimeManager.EntryBecameDead += entryBecameDead;
|
lifetimeManager.EntryBecameDead += entryBecameDead;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
|
||||||
|
// Application of hitobject during load() may have changed their start times, so ensure the correct sorting order.
|
||||||
|
SortInternal();
|
||||||
|
}
|
||||||
|
|
||||||
#region Pooling support
|
#region Pooling support
|
||||||
|
|
||||||
public void Add(HitObjectLifetimeEntry entry) => lifetimeManager.AddEntry(entry);
|
public void Add(HitObjectLifetimeEntry entry) => lifetimeManager.AddEntry(entry);
|
||||||
@ -163,7 +171,12 @@ namespace osu.Game.Rulesets.UI
|
|||||||
private void bindStartTime(DrawableHitObject hitObject)
|
private void bindStartTime(DrawableHitObject hitObject)
|
||||||
{
|
{
|
||||||
var bindable = hitObject.StartTimeBindable.GetBoundCopy();
|
var bindable = hitObject.StartTimeBindable.GetBoundCopy();
|
||||||
bindable.BindValueChanged(_ => SortInternal());
|
|
||||||
|
bindable.BindValueChanged(_ =>
|
||||||
|
{
|
||||||
|
if (IsLoaded)
|
||||||
|
SortInternal();
|
||||||
|
});
|
||||||
|
|
||||||
startTimeMap[hitObject] = bindable;
|
startTimeMap[hitObject] = bindable;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user