Fix DifficultyAdjustSettingsControl.SliderControl not following up with the current pattern

This was causing any `ValueChanged` event bind (such as the one in
`SettingsItem` to invoke `SettingsChanged`) to be overwritten when
`Current` is set afterwards.
This commit is contained in:
Salman Ahmed 2021-08-16 12:47:56 +03:00
parent 1c7cbc8621
commit 855fff1486

View File

@ -91,7 +91,13 @@ namespace osu.Game.Rulesets.Mods
{
// This is required as SettingsItem relies heavily on this bindable for internal use.
// The actual update flow is done via the bindable provided in the constructor.
public Bindable<float?> Current { get; set; } = new Bindable<float?>();
private readonly BindableWithCurrent<float?> current = new BindableWithCurrent<float?>();
public Bindable<float?> Current
{
get => current.Current;
set => current.Current = value;
}
public SliderControl(BindableNumber<float> currentNumber)
{