1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Fix RecreatePieces being called more than once

This commit is contained in:
Dean Herbert 2021-05-21 16:10:48 +09:00
parent 40c8378d81
commit a5ca736e37

View File

@ -52,15 +52,18 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
protected override void OnApply()
{
type.BindTo(HitObject.TypeBindable);
type.BindValueChanged(_ =>
{
updateActionsFromType();
RecreatePieces();
}, true);
// this doesn't need to be run inline as RecreatePieces is called by the base call below.
type.BindValueChanged(_ => RecreatePieces());
base.OnApply();
}
protected override void RecreatePieces()
{
updateActionsFromType();
base.RecreatePieces();
}
protected override void OnFree()
{
base.OnFree();