mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-01-01 02:03:32 +00:00
Core - Drop old brush entity when changing to a new brush
Core - Properly save brush entity sub-groups
This commit is contained in:
parent
cce8404cfa
commit
b2987b5190
@ -790,6 +790,7 @@ namespace Artemis.Core
|
|||||||
{
|
{
|
||||||
General.BrushReference.SetCurrentValue(layerBrush != null ? new LayerBrushReference(layerBrush.Descriptor) : null, null);
|
General.BrushReference.SetCurrentValue(layerBrush != null ? new LayerBrushReference(layerBrush.Descriptor) : null, null);
|
||||||
LayerBrush = layerBrush;
|
LayerBrush = layerBrush;
|
||||||
|
LayerEntity.LayerBrush = new LayerBrushEntity();
|
||||||
|
|
||||||
if (LayerBrush != null)
|
if (LayerBrush != null)
|
||||||
ActivateLayerBrush();
|
ActivateLayerBrush();
|
||||||
|
|||||||
@ -231,14 +231,18 @@ namespace Artemis.Core
|
|||||||
|
|
||||||
internal void ApplyToEntity()
|
internal void ApplyToEntity()
|
||||||
{
|
{
|
||||||
if (!PropertiesInitialized)
|
if (!PropertiesInitialized || PropertyGroupEntity == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
foreach (ILayerProperty layerProperty in LayerProperties)
|
foreach (ILayerProperty layerProperty in LayerProperties)
|
||||||
layerProperty.Save();
|
layerProperty.Save();
|
||||||
|
|
||||||
|
PropertyGroupEntity.PropertyGroups.Clear();
|
||||||
foreach (LayerPropertyGroup layerPropertyGroup in LayerPropertyGroups)
|
foreach (LayerPropertyGroup layerPropertyGroup in LayerPropertyGroups)
|
||||||
|
{
|
||||||
layerPropertyGroup.ApplyToEntity();
|
layerPropertyGroup.ApplyToEntity();
|
||||||
|
PropertyGroupEntity.PropertyGroups.Add(layerPropertyGroup.PropertyGroupEntity);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void Update(Timeline timeline)
|
internal void Update(Timeline timeline)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user