UI - Don't apply layer brush VMs too early

UI - Create layer geometry on ui thread
This commit is contained in:
SpoinkyNL committed 2020-06-01 18:14:01 +02:00
1 parent efee645bfb
commit a5b66441d9
2 files changed
+52 -48

No files matched your search

@@ -129,14 +129,14 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties
);
LayerPropertyGroups.Add(new LayerPropertyGroupViewModel(ProfileEditorService, layer.General, (PropertyGroupDescriptionAttribute) generalAttribute));
LayerPropertyGroups.Add(new LayerPropertyGroupViewModel(ProfileEditorService, layer.Transform, (PropertyGroupDescriptionAttribute) transformAttribute));
ApplyLayerBrush();
}
else
SelectedLayer = null;
TreeViewModel = new TreeViewModel(this, LayerPropertyGroups);
TimelineViewModel = new TimelineViewModel(this, LayerPropertyGroups);
ApplyLayerBrush();
}
private void SelectedLayerOnLayerBrushUpdated(object sender, EventArgs e)
@@ -146,6 +146,9 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties
public void ApplyLayerBrush()
{
if (SelectedLayer == null)
return;
var hideRenderRelatedProperties = SelectedLayer.LayerBrush != null && SelectedLayer.LayerBrush.BrushType == LayerBrushType.RgbNet;
SelectedLayer.General.ShapeType.IsHidden = hideRenderRelatedProperties;
SelectedLayer.General.FillType.IsHidden = hideRenderRelatedProperties;