mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Layer brushes - Make enable-disable process consistent with plugins
This commit is contained in:
1 parent
a1c2e4ad5a
commit
ee37c3b836
37 files changed
+325
-128
No files matched your search
@@ -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>();
|
||||
|
||||
@@ -129,7 +129,11 @@ namespace Artemis.Core.Models.Profile
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
if (!IsActivated) return;
|
||||
if (!IsActivated)
|
||||
return;
|
||||
|
||||
foreach (var layer in GetAllLayers())
|
||||
layer.Deactivate();
|
||||
|
||||
IsActivated = false;
|
||||
OnDeactivated();
|
||||
|
||||
Reference in new issue
Block a user