mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Profiles - Fixed folders not enabling after previous fix :)
This commit is contained in:
parent
6b6ea0f973
commit
f30cc31ead
@ -238,7 +238,7 @@ public sealed class Folder : RenderProfileElement
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override void Enable()
|
public override void Enable()
|
||||||
{
|
{
|
||||||
if (!Enabled)
|
if (Enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Not enabling children, they'll enable themselves during their own Update
|
// Not enabling children, they'll enable themselves during their own Update
|
||||||
|
|||||||
@ -839,11 +839,10 @@ public sealed class Layer : RenderProfileElement
|
|||||||
General.ShapeType.IsHidden = LayerBrush != null && !LayerBrush.SupportsTransformation;
|
General.ShapeType.IsHidden = LayerBrush != null && !LayerBrush.SupportsTransformation;
|
||||||
General.BlendMode.IsHidden = LayerBrush != null && !LayerBrush.SupportsTransformation;
|
General.BlendMode.IsHidden = LayerBrush != null && !LayerBrush.SupportsTransformation;
|
||||||
Transform.IsHidden = LayerBrush != null && !LayerBrush.SupportsTransformation;
|
Transform.IsHidden = LayerBrush != null && !LayerBrush.SupportsTransformation;
|
||||||
if (LayerBrush != null)
|
if (LayerBrush != null && Enabled)
|
||||||
{
|
{
|
||||||
if (!LayerBrush.Enabled)
|
|
||||||
LayerBrush.InternalEnable();
|
LayerBrush.InternalEnable();
|
||||||
LayerBrush?.Update(0);
|
LayerBrush.Update(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
OnLayerBrushUpdated();
|
OnLayerBrushUpdated();
|
||||||
|
|||||||
@ -223,6 +223,14 @@ public abstract class RenderProfileElement : ProfileElement
|
|||||||
|
|
||||||
// Make sure the layer effect is tied to this element
|
// Make sure the layer effect is tied to this element
|
||||||
layerEffect.ProfileElement = this;
|
layerEffect.ProfileElement = this;
|
||||||
|
|
||||||
|
// If the element is enabled, enable the effect before adding it
|
||||||
|
if (Enabled)
|
||||||
|
{
|
||||||
|
layerEffect.InternalEnable();
|
||||||
|
layerEffect.Update(0);
|
||||||
|
}
|
||||||
|
|
||||||
_layerEffects.Add(layerEffect);
|
_layerEffects.Add(layerEffect);
|
||||||
|
|
||||||
// Update the order on the effects
|
// Update the order on the effects
|
||||||
@ -246,6 +254,9 @@ public abstract class RenderProfileElement : ProfileElement
|
|||||||
// Remove the effect from the layer
|
// Remove the effect from the layer
|
||||||
_layerEffects.Remove(layerEffect);
|
_layerEffects.Remove(layerEffect);
|
||||||
|
|
||||||
|
// Disable the effect after removing it
|
||||||
|
layerEffect.InternalDisable();
|
||||||
|
|
||||||
// Update the order on the remaining effects
|
// Update the order on the remaining effects
|
||||||
OrderEffects();
|
OrderEffects();
|
||||||
OnLayerEffectsUpdated();
|
OnLayerEffectsUpdated();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user