mirror of
https://github.com/ppy/osu
synced 2024-12-22 23:05:02 +00:00
Merge pull request #27898 from bdach/preview-tracks-playing-after-hide
Fix preview tracks playing after their owning overlay has hidden
This commit is contained in:
commit
15d286e57d
@ -40,10 +40,12 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
protected override void PopOut()
|
protected override void PopOut()
|
||||||
{
|
{
|
||||||
base.PopOut();
|
|
||||||
|
|
||||||
Waves.Hide();
|
Waves.Hide();
|
||||||
this.FadeOut(WaveContainer.DISAPPEAR_DURATION, Easing.InQuint);
|
this.FadeOut(WaveContainer.DISAPPEAR_DURATION, Easing.InQuint)
|
||||||
|
// base call is responsible for stopping preview tracks.
|
||||||
|
// delay it until the fade has concluded to ensure that nothing inside the overlay has triggered
|
||||||
|
// another preview track playback in the meantime, leaving an "orphaned" preview playing.
|
||||||
|
.OnComplete(_ => base.PopOut());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user