mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:07:52 +08:00
Apply performance regression fix to effect section too
This commit is contained in:
parent
6b709de2c2
commit
801e11d841
@ -31,18 +31,33 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
});
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
kiai.Current.BindValueChanged(_ => saveChanges());
|
||||
omitBarLine.Current.BindValueChanged(_ => saveChanges());
|
||||
scrollSpeedSlider.Current.BindValueChanged(_ => saveChanges());
|
||||
|
||||
void saveChanges()
|
||||
{
|
||||
if (!isRebinding) ChangeHandler?.SaveState();
|
||||
}
|
||||
}
|
||||
|
||||
private bool isRebinding;
|
||||
|
||||
protected override void OnControlPointChanged(ValueChangedEvent<EffectControlPoint> point)
|
||||
{
|
||||
if (point.NewValue != null)
|
||||
{
|
||||
isRebinding = true;
|
||||
|
||||
kiai.Current = point.NewValue.KiaiModeBindable;
|
||||
kiai.Current.BindValueChanged(_ => ChangeHandler?.SaveState());
|
||||
|
||||
omitBarLine.Current = point.NewValue.OmitFirstBarLineBindable;
|
||||
omitBarLine.Current.BindValueChanged(_ => ChangeHandler?.SaveState());
|
||||
|
||||
scrollSpeedSlider.Current = point.NewValue.ScrollSpeedBindable;
|
||||
scrollSpeedSlider.Current.BindValueChanged(_ => ChangeHandler?.SaveState());
|
||||
|
||||
isRebinding = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user