Profile editor - Fixed new layers not saving in some situations

Profile tree - Improved buttons visibility
Layer brushes - Support transformation by default, unless a RGB.NET brush
This commit is contained in:
SpoinkyNL committed 2020-06-11 12:47:46 +02:00
1 parent c3a9a6ce9f
commit 692cf806b7
13 files changed
+88 -40

No files matched your search

@@ -47,6 +47,8 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties
}
public Layer SelectedLayer { get; set; }
public Folder SelectedFolder { get; set; }
public BindableCollection<LayerPropertyGroupViewModel> LayerPropertyGroups { get; set; }
public TreeViewModel TreeViewModel { get; set; }
public TimelineViewModel TimelineViewModel { get; set; }
@@ -104,6 +106,10 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties
private void PopulateProperties(ProfileElement profileElement)
{
if (SelectedFolder != null)
{
SelectedFolder = null;
}
if (SelectedLayer != null)
{
SelectedLayer.LayerBrushUpdated -= SelectedLayerOnLayerBrushUpdated;
@@ -115,7 +121,11 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties
LayerPropertyGroups.Clear();
_brushPropertyGroup = null;
if (profileElement is Layer layer)
if (profileElement is Folder folder)
{
SelectedFolder = folder;
}
else if (profileElement is Layer layer)
{
SelectedLayer = layer;
SelectedLayer.LayerBrushUpdated += SelectedLayerOnLayerBrushUpdated;
@@ -151,7 +161,8 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties
if (SelectedLayer == null)
return;
var hideRenderRelatedProperties = SelectedLayer?.LayerBrush?.BrushType == LayerBrushType.Regular && SelectedLayer.LayerBrush.SupportsTransformation;
var hideRenderRelatedProperties = SelectedLayer?.LayerBrush != null && !SelectedLayer.LayerBrush.SupportsTransformation;
SelectedLayer.General.ShapeType.IsHidden = hideRenderRelatedProperties;
SelectedLayer.General.FillType.IsHidden = hideRenderRelatedProperties;
SelectedLayer.General.BlendMode.IsHidden = hideRenderRelatedProperties;