Making sure we don't executer rebuilds while in a separate thread from the UI

This commit is contained in:
Lars Brubaker 2021-05-03 17:58:03 -07:00
parent cc7144f00c
commit 1c9119568f
30 changed files with 218 additions and 128 deletions

View file

@ -181,14 +181,15 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
Mesh = null;
}
rebuildLock.Dispose();
if (valuesChanged)
UiThread.RunOnIdle(() =>
{
Invalidate(InvalidateType.DisplayValues);
}
Parent?.Invalidate(new InvalidateArgs(this, InvalidateType.Mesh));
rebuildLock.Dispose();
if (valuesChanged)
{
Invalidate(InvalidateType.DisplayValues);
}
Parent?.Invalidate(new InvalidateArgs(this, InvalidateType.Mesh));
});
return Task.CompletedTask;
});
}