Profile editor - Fixed new elements not rendering while paused

Profile editor - Use default brush on new layers
Profile tree - Implement drag & drop
This commit is contained in:
Robert committed 2022-03-09 00:10:41 +01:00
1 parent f5a902f5a5
commit 376a9142d3
14 files changed
+335 -229

No files matched your search

@@ -27,5 +27,7 @@ namespace Artemis.Core.Services
/// Returns the descriptor of the default layer brush
/// </summary>
LayerBrushDescriptor? GetDefaultLayerBrush();
void ApplyDefaultBrush(Layer layer);
}
}
@@ -46,5 +46,13 @@ namespace Artemis.Core.Services
defaultReference.Value.BrushType ??= "SolidBrush";
return LayerBrushStore.Get(defaultReference.Value.LayerBrushProviderId, defaultReference.Value.BrushType)?.LayerBrushDescriptor;
}
/// <inheritdoc />
public void ApplyDefaultBrush(Layer layer)
{
LayerBrushDescriptor? brush = GetDefaultLayerBrush();
if (brush != null)
layer.ChangeLayerBrush(brush.CreateInstance(layer, null));
}
}
}