mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-12 21:38:38 +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 />
|
||||
public override void Enable()
|
||||
{
|
||||
if (!Enabled)
|
||||
if (Enabled)
|
||||
return;
|
||||
|
||||
// Not enabling children, they'll enable themselves during their own Update
|
||||
|
||||
@ -505,7 +505,7 @@ public sealed class Layer : RenderProfileElement
|
||||
{
|
||||
if (Enabled)
|
||||
return;
|
||||
|
||||
|
||||
bool tryOrBreak = TryOrBreak(() => LayerBrush?.InternalEnable(), "Failed to enable layer brush");
|
||||
if (!tryOrBreak)
|
||||
return;
|
||||
@ -839,11 +839,10 @@ public sealed class Layer : RenderProfileElement
|
||||
General.ShapeType.IsHidden = LayerBrush != null && !LayerBrush.SupportsTransformation;
|
||||
General.BlendMode.IsHidden = LayerBrush != null && !LayerBrush.SupportsTransformation;
|
||||
Transform.IsHidden = LayerBrush != null && !LayerBrush.SupportsTransformation;
|
||||
if (LayerBrush != null)
|
||||
if (LayerBrush != null && Enabled)
|
||||
{
|
||||
if (!LayerBrush.Enabled)
|
||||
LayerBrush.InternalEnable();
|
||||
LayerBrush?.Update(0);
|
||||
LayerBrush.InternalEnable();
|
||||
LayerBrush.Update(0);
|
||||
}
|
||||
|
||||
OnLayerBrushUpdated();
|
||||
|
||||
@ -223,6 +223,14 @@ public abstract class RenderProfileElement : ProfileElement
|
||||
|
||||
// Make sure the layer effect is tied to this element
|
||||
layerEffect.ProfileElement = this;
|
||||
|
||||
// If the element is enabled, enable the effect before adding it
|
||||
if (Enabled)
|
||||
{
|
||||
layerEffect.InternalEnable();
|
||||
layerEffect.Update(0);
|
||||
}
|
||||
|
||||
_layerEffects.Add(layerEffect);
|
||||
|
||||
// Update the order on the effects
|
||||
@ -246,6 +254,9 @@ public abstract class RenderProfileElement : ProfileElement
|
||||
// Remove the effect from the layer
|
||||
_layerEffects.Remove(layerEffect);
|
||||
|
||||
// Disable the effect after removing it
|
||||
layerEffect.InternalDisable();
|
||||
|
||||
// Update the order on the remaining effects
|
||||
OrderEffects();
|
||||
OnLayerEffectsUpdated();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user