mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Layer properties - Restored much functionality on the reworked VMs
This commit is contained in:
1 parent
ea66dcd39e
commit
221c8bc7e7
29 files changed
+440
-209
No files matched your search
@@ -93,8 +93,8 @@ namespace Artemis.Core.Services.Storage
|
||||
module.ChangeActiveProfile(profile, _surfaceService.ActiveSurface);
|
||||
if (profile != null)
|
||||
{
|
||||
InitializeCoreProperties(profile);
|
||||
InstantiateProfileLayerBrushes(profile);
|
||||
InitializeLayerProperties(profile);
|
||||
InstantiateLayerBrushes(profile);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,18 +159,18 @@ namespace Artemis.Core.Services.Storage
|
||||
_logger.Debug("Redo profile update - Success");
|
||||
}
|
||||
|
||||
private void InitializeCoreProperties(Profile profile)
|
||||
private void InitializeLayerProperties(Profile profile)
|
||||
{
|
||||
foreach (var layer in profile.GetAllLayers().Where(l => l.LayerBrush == null))
|
||||
{
|
||||
if (!layer.General.PropertiesInitialized)
|
||||
layer.General.InitializeProperties(_layerService, layer, null);
|
||||
layer.General.InitializeProperties(_layerService, layer, "General.");
|
||||
if (!layer.Transform.PropertiesInitialized)
|
||||
layer.Transform.InitializeProperties(_layerService, layer, null);
|
||||
layer.Transform.InitializeProperties(_layerService, layer, "Transform.");
|
||||
};
|
||||
}
|
||||
|
||||
private void InstantiateProfileLayerBrushes(Profile profile)
|
||||
private void InstantiateLayerBrushes(Profile profile)
|
||||
{
|
||||
// Only instantiate brushes for layers without an existing brush instance
|
||||
foreach (var layer in profile.GetAllLayers().Where(l => l.LayerBrush == null))
|
||||
@@ -188,7 +188,7 @@ namespace Artemis.Core.Services.Storage
|
||||
{
|
||||
var profileModules = _pluginService.GetPluginsOfType<ProfileModule>();
|
||||
foreach (var profileModule in profileModules.Where(p => p.ActiveProfile != null).ToList())
|
||||
InstantiateProfileLayerBrushes(profileModule.ActiveProfile);
|
||||
InstantiateLayerBrushes(profileModule.ActiveProfile);
|
||||
}
|
||||
|
||||
#region Event handlers
|
||||
|
||||
Reference in new issue
Block a user