mat1jaczyyy/apollo-studio

FadeViewer: UI regenerate runs on current thread instead of UI thread

Closed this issue · 0 comments

void Gradient_Generate(List<Fade.FadeInfo> points) {
if (Program.Project.IsDisposing) return;
fullFade = points;
LinearGradientBrush gradient = (LinearGradientBrush)Gradient.Fill;
Dispatcher.UIThread.InvokeAsync(() => {
gradient.GradientStops.Clear();

An attempt was made, but we try get Gradient.Fill on current thread instead of UI thread which isn't good.

This code can be called by Generate in Fade.cs which can be called by BPM change from Ableton Connector which is not on the UI thread.

Ty AlexayForest for report