Avoid bindable feedback causing overwrites

This commit is contained in:
Dean Herbert
2021-05-26 13:24:22 +09:00
parent 9223d85f37
commit 912748b428
3 changed files with 26 additions and 41 deletions

View File

@ -38,7 +38,7 @@ namespace osu.Game.Rulesets.Taiko.Objects
protected TaikoStrongableHitObject()
{
IsStrongBindable.BindValueChanged(_ => UpdateSamplesFromType());
IsStrongBindable.BindValueChanged(_ => updateSamplesFromType());
}
protected override void UpdateTypeFromSamples()
@ -48,10 +48,8 @@ namespace osu.Game.Rulesets.Taiko.Objects
IsStrong = getStrongSamples().Any();
}
protected override void UpdateSamplesFromType()
private void updateSamplesFromType()
{
base.UpdateSamplesFromType();
var strongSamples = getStrongSamples();
if (IsStrongBindable.Value != strongSamples.Any())