mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 01:02:56 +08:00
Remove unnecessary UnbindAdjustments
call
It is not necessary given that `CurrentTrack` already removes all adjustments first.
This commit is contained in:
parent
36a7644164
commit
9446be2511
@ -393,21 +393,11 @@ namespace osu.Game.Overlays
|
||||
CurrentTrack.RemoveAllAdjustments(AdjustableProperty.Tempo);
|
||||
CurrentTrack.RemoveAllAdjustments(AdjustableProperty.Volume);
|
||||
|
||||
var applicableToTrack = mods.Value.OfType<IApplicableToTrack>();
|
||||
|
||||
if (!allowTrackAdjustments || !applicableToTrack.Any())
|
||||
{
|
||||
if (modTrackAdjustments != null)
|
||||
{
|
||||
CurrentTrack.UnbindAdjustments(modTrackAdjustments);
|
||||
modTrackAdjustments = null;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (allowTrackAdjustments)
|
||||
{
|
||||
CurrentTrack.BindAdjustments(modTrackAdjustments = new AudioAdjustments());
|
||||
|
||||
foreach (var mod in applicableToTrack)
|
||||
foreach (var mod in mods.Value.OfType<IApplicableToTrack>())
|
||||
mod.ApplyToTrack(modTrackAdjustments);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user