1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 09:58:21 +08:00

Merge pull request #10062 from frenzibyte/fix-music-controller-propagating-event-twice

Fix MusicController raising track changed event twice
This commit is contained in:
Dean Herbert 2020-09-04 20:09:49 +09:00 committed by GitHub
commit a0bc376446
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -279,6 +279,11 @@ namespace osu.Game.Overlays
private void changeBeatmap(WorkingBeatmap newWorking)
{
// This method can potentially be triggered multiple times as it is eagerly fired in next() / prev() to ensure correct execution order
// (changeBeatmap must be called before consumers receive the bindable changed event, which is not the case when the local beatmap bindable is updated directly).
if (newWorking == current)
return;
var lastWorking = current;
TrackChangeDirection direction = TrackChangeDirection.None;