diff --git a/osu.Game/Overlays/RestoreDefaultValueButton.cs b/osu.Game/Overlays/RestoreDefaultValueButton.cs index 7413837852..469d48d82b 100644 --- a/osu.Game/Overlays/RestoreDefaultValueButton.cs +++ b/osu.Game/Overlays/RestoreDefaultValueButton.cs @@ -35,9 +35,9 @@ namespace osu.Game.Overlays current?.UnbindAll(); current = value.GetBoundCopy(); - current.ValueChanged += onValueChanged; - current.DefaultChanged += onDefaultChanged; - current.DisabledChanged += onDisabledChanged; + current.ValueChanged += _ => UpdateState(); + current.DefaultChanged += _ => UpdateState(); + current.DisabledChanged += _ => UpdateState(); UpdateState(); } } @@ -93,10 +93,6 @@ namespace osu.Game.Overlays UpdateState(); } - private void onValueChanged(ValueChangedEvent _) => UpdateState(); - private void onDefaultChanged(ValueChangedEvent _) => UpdateState(); - private void onDisabledChanged(bool _) => UpdateState(); - public void UpdateState() => Scheduler.AddOnce(updateState); private void updateState()