mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Do not store direct references to original bindable
`DifficultyAdjustSettingsControl` and its inner `SliderControl` were holding different references to `DifficultyBindable`s from the difficulty adjust mod, therefore leading to bindings being lost to the framework-side automatic unbind logic if the mod was toggled off and back on in rapid succession. Resolve by adding a shadowed implementation of `GetBoundCopy()` and using it to isolate the controls from the mod bindable.
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user