mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
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:
1 parent
e036cbbfe4
commit
7b238e241e
22 files changed
+207
-42
No files matched your search
@@ -40,7 +40,7 @@ namespace Artemis.Core.Services
|
||||
{
|
||||
RemoveLayerBrush(layer);
|
||||
|
||||
var descriptorReference = layer.General.BrushReference.CurrentValue;
|
||||
var descriptorReference = layer.General.BrushReference?.CurrentValue;
|
||||
if (descriptorReference == null)
|
||||
return null;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user