mirror of https://github.com/ppy/osu
Fix crossthread operations due to Track.Completed
This commit is contained in:
parent
109abf4d28
commit
30815ace62
|
@ -28,7 +28,7 @@ public abstract class PreviewTrack : Component
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
track = GetTrack();
|
track = GetTrack();
|
||||||
track.Completed += Stop;
|
track.Completed += () => Schedule(Stop);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -351,11 +351,11 @@ private void beatmapChanged(ValueChangedEvent<WorkingBeatmap> beatmap)
|
||||||
queuedDirection = null;
|
queuedDirection = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void currentTrackCompleted()
|
private void currentTrackCompleted() => Schedule(() =>
|
||||||
{
|
{
|
||||||
if (!beatmap.Disabled && beatmapSets.Any())
|
if (!beatmap.Disabled && beatmapSets.Any())
|
||||||
next();
|
next();
|
||||||
}
|
});
|
||||||
|
|
||||||
private ScheduledDelegate pendingBeatmapSwitch;
|
private ScheduledDelegate pendingBeatmapSwitch;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue