Layer brushes - Make enable-disable process consistent with plugins

This commit is contained in:
SpoinkyNL committed 2020-06-07 15:00:40 +02:00
1 parent 6327107277
commit 33bb3ffa6c
37 files changed
+325 -128

No files matched your search

+17
View File
@@ -408,6 +408,23 @@ namespace Artemis.Core.Models.Profile
CalculateRenderProperties();
}
internal void Deactivate()
{
DeactivateLayerBrush();
}
internal void DeactivateLayerBrush()
{
if (LayerBrush == null)
return;
var brush = LayerBrush;
LayerBrush = null;
brush.Dispose();
LayerEntity.PropertyEntities.RemoveAll(p => p.PluginGuid == brush.PluginInfo.Guid);
}
internal void PopulateLeds(ArtemisSurface surface)
{
var leds = new List<ArtemisLed>();