Profile elements - Simplified class hierarchy

Profile editor - Seperated event types and avoid a lot of type checking
Profile editor - Avoid changing profiles/layers if the new equals the old
Color picker - Fixed binding error
Profile tree - Select first element by default
Profile editor - Adjusted initialization order
This commit is contained in:
Robert committed 2020-07-09 12:23:57 +02:00
1 parent 70aaa645fb
commit 7b27d076b3
25 files changed
+303 -195

No files matched your search

+6 -3
View File
@@ -7,7 +7,7 @@ using SkiaSharp;
namespace Artemis.Core.Models.Profile
{
public sealed class Folder : EffectProfileElement
public sealed class Folder : RenderProfileElement
{
private SKBitmap _folderBitmap;
@@ -159,7 +159,7 @@ namespace Artemis.Core.Models.Profile
var path = new SKPath {FillType = SKPathFillType.Winding};
foreach (var child in Children)
{
if (child is EffectProfileElement effectChild && effectChild.Path != null)
if (child is RenderProfileElement effectChild && effectChild.Path != null)
path.AddPath(effectChild.Path);
}
@@ -182,10 +182,13 @@ namespace Artemis.Core.Models.Profile
FolderEntity.Enabled = Enabled;
FolderEntity.ProfileId = Profile.EntityId;
FolderEntity.ExpandedPropertyGroups.Clear();
FolderEntity.ExpandedPropertyGroups.AddRange(_expandedPropertyGroups);
ApplyLayerEffectsToEntity();
// TODO: conditions
// Conditions
DisplayConditionGroup?.ApplyToEntity();
}
#region Events