mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Layer timeline - Show keyframes of collapsed groups
Profile editor - Don't reload UI elements on undo/redo if there's nothing to undo/redo Layer properties - Properly show/hide properties
This commit is contained in:
1 parent
dd000e7bed
commit
728baa1b7f
20 files changed
+182
-83
No files matched your search
@@ -26,13 +26,13 @@ namespace Artemis.Core.Services.Storage.Interfaces
|
||||
/// </summary>
|
||||
/// <param name="selectedProfile"></param>
|
||||
/// <param name="module"></param>
|
||||
void UndoUpdateProfile(Profile selectedProfile, ProfileModule module);
|
||||
bool UndoUpdateProfile(Profile selectedProfile, ProfileModule module);
|
||||
|
||||
/// <summary>
|
||||
/// Attempts to restore the profile to the state it had before the last <see cref="UndoUpdateProfile" /> call.
|
||||
/// </summary>
|
||||
/// <param name="selectedProfile"></param>
|
||||
/// <param name="module"></param>
|
||||
void RedoUpdateProfile(Profile selectedProfile, ProfileModule module);
|
||||
bool RedoUpdateProfile(Profile selectedProfile, ProfileModule module);
|
||||
}
|
||||
}
|
||||
@@ -123,12 +123,12 @@ namespace Artemis.Core.Services.Storage
|
||||
_profileRepository.Save(profile.ProfileEntity);
|
||||
}
|
||||
|
||||
public void UndoUpdateProfile(Profile profile, ProfileModule module)
|
||||
public bool UndoUpdateProfile(Profile profile, ProfileModule module)
|
||||
{
|
||||
if (!profile.UndoStack.Any())
|
||||
{
|
||||
_logger.Debug("Undo profile update - Failed, undo stack empty");
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
ActivateProfile(module, null);
|
||||
@@ -140,14 +140,15 @@ namespace Artemis.Core.Services.Storage
|
||||
ActivateProfile(module, profile);
|
||||
|
||||
_logger.Debug("Undo profile update - Success");
|
||||
return true;
|
||||
}
|
||||
|
||||
public void RedoUpdateProfile(Profile profile, ProfileModule module)
|
||||
public bool RedoUpdateProfile(Profile profile, ProfileModule module)
|
||||
{
|
||||
if (!profile.RedoStack.Any())
|
||||
{
|
||||
_logger.Debug("Redo profile update - Failed, redo empty");
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
ActivateProfile(module, null);
|
||||
@@ -159,6 +160,7 @@ namespace Artemis.Core.Services.Storage
|
||||
ActivateProfile(module, profile);
|
||||
|
||||
_logger.Debug("Redo profile update - Success");
|
||||
return true;
|
||||
}
|
||||
|
||||
private void InitializeLayerProperties(Profile profile)
|
||||
@@ -169,7 +171,9 @@ namespace Artemis.Core.Services.Storage
|
||||
layer.General.InitializeProperties(_layerService, layer, "General.");
|
||||
if (!layer.Transform.PropertiesInitialized)
|
||||
layer.Transform.InitializeProperties(_layerService, layer, "Transform.");
|
||||
};
|
||||
}
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
private void InstantiateLayerBrushes(Profile profile)
|
||||
@@ -178,7 +182,7 @@ namespace Artemis.Core.Services.Storage
|
||||
foreach (var layer in profile.GetAllLayers().Where(l => l.LayerBrush == null))
|
||||
_layerService.InstantiateLayerBrush(layer);
|
||||
}
|
||||
|
||||
|
||||
private void ActiveProfilesPopulateLeds(ArtemisSurface surface)
|
||||
{
|
||||
var profileModules = _pluginService.GetPluginsOfType<ProfileModule>();
|
||||
@@ -192,7 +196,7 @@ namespace Artemis.Core.Services.Storage
|
||||
foreach (var profileModule in profileModules.Where(p => p.ActiveProfile != null).ToList())
|
||||
InstantiateLayerBrushes(profileModule.ActiveProfile);
|
||||
}
|
||||
|
||||
|
||||
#region Event handlers
|
||||
|
||||
private void OnActiveSurfaceConfigurationSelected(object sender, SurfaceConfigurationEventArgs e)
|
||||
|
||||
Reference in new issue
Block a user