Skip to content

Profile editor - Fix undo and editor service bugs found by the tests - #913

Merged
RobertBeekman merged 2 commits into
masterfrom
fix/profile-editor
Oct 24, 2026
Merged

RobertBeekman merged 2 commits into
masterfrom
fix/profile-editor

Conversation

@RobertBeekman

@RobertBeekman RobertBeekman commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Fixes the profile editor bugs found by the test suite (#907). Each fix flips the test that pinned the old behaviour.

Fixed: undo

  • Undoing a change to an existing keyframe's value restores the value. It used to delete the keyframe.
  • Undoing "remove effect" puts the effect back in its place. It used to end up below the effect after it. Effects apply in order, so this could change how the layer looked.
  • Undoing "toggle keyframes" restores what it was before. "Enabling" keyframes that were already on used to turn them off on undo.
  • Undoing a brush change on a layer that had no brush removes the brush again. This adds Layer.RemoveLayerBrush() to Core.
  • Undoing "add element" disables the element again, like removing an element does.
  • Undoing an event path change back to "no path" goes back to an event start node, like a new condition. This changes EventCondition.UpdateEventNode in Core to handle a missing path.
  • MoveProfileElement says "Move folder" for folders.
  • UpdateLayerProperty without a time no longer calls itself "Add … keyframe" when it doesn't add one.

Fixed: editor service

  • One failed auto-save no longer stops auto-saving for the rest of the session. The error dialog still shows.
  • A failing command is no longer also reported to ReactiveUI as unhandled. Before, the app treated it as a crash on top of the error dialog.
  • Resuming editing applies the editor's time right away.
  • Nothing is focused while editing is suspended. The focus used to be cleared and set again right away.
  • A layer created on another layer gets a name that isn't already used next to it.
  • CanUndo and CanRedo start out false, so bindings made later show the right state.
  • An empty command scope doesn't add an undo step.
  • New subscribers to History get the current history once instead of twice.
  • Expanding the keyframe selection with a keyframe that's already selected doesn't add it twice.
  • Snapping can snap to a snap time of zero, for example a keyframe at the very start.

Testing

  • Artemis.Core.Tests: 1385 passed
  • Artemis.UI.Shared.Tests: 176 passed
  • The full solution builds.

- 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"
… and smaller editor issues

- A failed auto-save no longer stops auto-saving for the rest of the session
- A failing command is no longer also reported to ReactiveUI as unhandled, on top of the error dialog
- Resuming editing applies the editor's time again right away
- Nothing is focused while editing is suspended
- A layer created on another layer gets a name that isn't in use next to it
- CanUndo and CanRedo start out false, so new subscribers know the state right away
- An empty command scope doesn't add an undo step
- New subscribers to History get the current history once
- Expanding the keyframe selection with an already selected keyframe doesn't add it twice
- Snapping can snap to a snap time of zero
@RobertBeekman
RobertBeekman marked this pull request as ready for review October 20, 2026 17:21
@RobertBeekman
RobertBeekman merged commit 295038f into master Oct 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant