diff --git a/osu.Game/Rulesets/Mods/DifficultyAdjustSettingsControl.cs b/osu.Game/Rulesets/Mods/DifficultyAdjustSettingsControl.cs index 0f48ed4190..067657159b 100644 --- a/osu.Game/Rulesets/Mods/DifficultyAdjustSettingsControl.cs +++ b/osu.Game/Rulesets/Mods/DifficultyAdjustSettingsControl.cs @@ -41,10 +41,10 @@ namespace osu.Game.Rulesets.Mods { // Intercept and extract the internal number bindable from DifficultyBindable. // This will provide bounds and precision specifications for the slider bar. - difficultyBindable = (DifficultyBindable)value; + difficultyBindable = ((DifficultyBindable)value).GetBoundCopy(); sliderDisplayCurrent.BindTo(difficultyBindable.CurrentNumber); - base.Current = value; + base.Current = difficultyBindable; } } diff --git a/osu.Game/Rulesets/Mods/DifficultyBindable.cs b/osu.Game/Rulesets/Mods/DifficultyBindable.cs index 26538fa4e3..0f16126464 100644 --- a/osu.Game/Rulesets/Mods/DifficultyBindable.cs +++ b/osu.Game/Rulesets/Mods/DifficultyBindable.cs @@ -92,5 +92,16 @@ namespace osu.Game.Rulesets.Mods { CurrentNumber.MaxValue = ExtendedLimits.Value && extendedMaxValue != null ? extendedMaxValue.Value : maxValue; } + + public new DifficultyBindable GetBoundCopy() => new DifficultyBindable + { + BindTarget = this, + CurrentNumber = { BindTarget = CurrentNumber }, + ExtendedLimits = { BindTarget = ExtendedLimits }, + ReadCurrentFromDifficulty = ReadCurrentFromDifficulty, + // the following is only safe as long as these values are effectively constants. + MaxValue = maxValue, + ExtendedMaxValue = extendedMaxValue + }; } }