mirror of
https://github.com/ppy/osu.git
synced 2025-02-14 06:33:17 +08:00
Fix catch distance snap provider not hiding slider properly
Regressed in https://github.com/ppy/osu/pull/25171. The old code was kinda dependent on correct order of setting `Disabled`. `CatchHitObjectComposer` would disable distance spacing in its BDL, and then via the base `DistancedHitObjectComposer.LoadComplete()`, the slider would be faded out. The switch to composition broke that ordering. To fix, stop relying on ordering and just respond to changes as they come. That's what bindables are for.
This commit is contained in:
parent
359ae31204
commit
79910df959
@ -98,12 +98,6 @@ namespace osu.Game.Rulesets.Edit
|
||||
}
|
||||
});
|
||||
|
||||
if (DistanceSpacingMultiplier.Disabled)
|
||||
{
|
||||
distanceSpacingSlider.Hide();
|
||||
return;
|
||||
}
|
||||
|
||||
DistanceSpacingMultiplier.Value = editorBeatmap.BeatmapInfo.DistanceSpacing;
|
||||
DistanceSpacingMultiplier.BindValueChanged(multiplier =>
|
||||
{
|
||||
@ -116,6 +110,8 @@ namespace osu.Game.Rulesets.Edit
|
||||
editorBeatmap.BeatmapInfo.DistanceSpacing = multiplier.NewValue;
|
||||
}, true);
|
||||
|
||||
DistanceSpacingMultiplier.BindDisabledChanged(disabled => distanceSpacingSlider.Alpha = disabled ? 0 : 1, true);
|
||||
|
||||
// Manual binding to handle enabling distance spacing when the slider is interacted with.
|
||||
distanceSpacingSlider.Current.BindValueChanged(spacing =>
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user