mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 03:19:56 +00:00
Profile editor - Fix undoing profile editor commands
- Undoing a change to an existing keyframe's value restores the value instead of deleting the keyframe - Undoing "remove effect" puts the effect back in its place instead of below the next one - Undoing "toggle keyframes" restores what it was before - Undoing a brush change on a layer that had no brush removes the brush again, using the new Layer.RemoveLayerBrush - Undoing "add element" disables the element again - Undoing an event path change back to no path goes back to an event start node, like a new condition - MoveProfileElement says "Move folder" for folders - UpdateLayerProperty without a time no longer calls itself "Add ... keyframe"
This commit is contained in:
1 parent
504845c7d2
commit
0920cf8917
14 files changed
+80
-71
No files matched your search
@@ -67,7 +67,7 @@ public class LayerBrushAndLedCommandTests : ProfileEditorTestBase
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ChangeLayerBrush_Undo_OnALayerWithoutBrush_KeepsTheNewBrush()
|
||||
public void ChangeLayerBrush_Undo_OnALayerWithoutBrush_RemovesTheNewBrush()
|
||||
{
|
||||
Layer layer = new(Root, "Layer without brush");
|
||||
Root.AddChild(layer);
|
||||
@@ -76,8 +76,8 @@ public class LayerBrushAndLedCommandTests : ProfileEditorTestBase
|
||||
command.Execute();
|
||||
command.Undo();
|
||||
|
||||
// Pinned as-is: with no brush to go back to, undo leaves the new brush (and the brush reference) in place
|
||||
layer.LayerBrush.ShouldBeOfType<GradientTestBrush>();
|
||||
layer.LayerBrush.ShouldBeNull();
|
||||
layer.General.BrushReference.CurrentValue.ShouldBeNull();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
Reference in new issue
Block a user