Datamodels - A few small fixes to fix errors during startup

Layer properties - Reimplemented property tree
Stylet - Add support for binding views to generic VMs
This commit is contained in:
SpoinkyNL committed 2020-05-17 18:54:15 +02:00
1 parent e036cbbfe4
commit 7b238e241e
22 files changed
+207 -42

No files matched your search

@@ -93,6 +93,7 @@ namespace Artemis.Core.Services.Storage
module.ChangeActiveProfile(profile, _surfaceService.ActiveSurface);
if (profile != null)
{
InitializeCoreProperties(profile);
InstantiateProfileLayerBrushes(profile);
}
}
@@ -158,6 +159,17 @@ namespace Artemis.Core.Services.Storage
_logger.Debug("Redo profile update - Success");
}
private void InitializeCoreProperties(Profile profile)
{
foreach (var layer in profile.GetAllLayers().Where(l => l.LayerBrush == null))
{
if (!layer.General.PropertiesInitialized)
layer.General.InitializeProperties(_layerService, layer, null);
if (!layer.Transform.PropertiesInitialized)
layer.Transform.InitializeProperties(_layerService, layer, null);
};
}
private void InstantiateProfileLayerBrushes(Profile profile)
{
// Only instantiate brushes for layers without an existing brush instance