mirror of https://github.com/ppy/osu
Run `RecreatePieces` using `AddOnce` to avoid multiple unnecessary calls
This commit is contained in:
parent
0bcd0cda6b
commit
6471ce902d
|
@ -53,7 +53,7 @@ protected override void OnApply()
|
|||
{
|
||||
type.BindTo(HitObject.TypeBindable);
|
||||
// this doesn't need to be run inline as RecreatePieces is called by the base call below.
|
||||
type.BindValueChanged(_ => RecreatePieces());
|
||||
type.BindValueChanged(_ => Scheduler.AddOnce(RecreatePieces));
|
||||
|
||||
base.OnApply();
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ protected override void OnApply()
|
|||
{
|
||||
isStrong.BindTo(HitObject.IsStrongBindable);
|
||||
// this doesn't need to be run inline as RecreatePieces is called by the base call below.
|
||||
isStrong.BindValueChanged(_ => RecreatePieces());
|
||||
isStrong.BindValueChanged(_ => Scheduler.AddOnce(RecreatePieces));
|
||||
|
||||
base.OnApply();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue