Brush presets - Reset properties to default before applying preset

Layer properties - Disable keyframes when resetting to default
Device dialogs - Only dim unselected LEDs if a LED is selected
Migrations - Renamed to stay in order 
Migrations - Added migration for color gradients
This commit is contained in:
Robert committed 2021-04-06 20:56:18 +02:00
1 parent 2bc882c814
commit 60df649eb0
22 files changed
+376 -319

No files matched your search

+6 -10
View File
@@ -251,20 +251,16 @@ namespace Artemis.Core.Services
// Draw a white overlay over the device
void DrawOverlay(object? sender, FrameRenderingEventArgs args)
{
if (intro.AnimationProfile.GetAllLayers().All(l => l.Timeline.IsFinished))
{
FrameRendering -= DrawOverlay;
intro.AnimationProfile.Dispose();
}
intro.Render(args.DeltaTime, args.Canvas);
}
FrameRendering += DrawOverlay;
// Stop rendering after the profile finishes (take 1 second extra in case of slow updates)
TimeSpan introLength = intro.AnimationProfile.GetAllLayers().Max(l => l.Timeline.Length)!;
Task.Run(async () =>
{
await Task.Delay(introLength.Add(TimeSpan.FromSeconds(1)));
FrameRendering -= DrawOverlay;
intro.AnimationProfile.Dispose();
});
}
public event EventHandler? Initialized;