23 lines
1.3 KiB
Markdown
23 lines
1.3 KiB
Markdown
## ADDED Requirements
|
|
|
|
### Requirement: Sublayer creation is undoable
|
|
The system SHALL push a `LayerCreateCommand` to `CommandHistory` when a new sublayer is created via the Layer panel. `Undo()` SHALL remove the sublayer from the layer stack. `Redo()` SHALL re-add it at the same position.
|
|
|
|
#### Scenario: Undo removes created sublayer
|
|
- **WHEN** the user creates a sublayer and then presses Ctrl+Z
|
|
- **THEN** the sublayer is no longer in the layer stack
|
|
|
|
### Requirement: Sublayer removal is undoable
|
|
The system SHALL push a `LayerRemoveCommand` to `CommandHistory` when a sublayer is removed via the Layer panel. `Undo()` SHALL re-insert the layer path at its original index. `Redo()` SHALL remove it again.
|
|
|
|
#### Scenario: Undo restores removed sublayer
|
|
- **WHEN** the user removes a sublayer and then presses Ctrl+Z
|
|
- **THEN** the sublayer reappears at its original position in the stack
|
|
|
|
### Requirement: Sublayer reorder is undoable
|
|
The system SHALL push a `LayerReorderCommand` to `CommandHistory` when sublayers are reordered (moved up or moved down) in the Layer panel. The command SHALL store the full ordered list before and after. `Undo()` SHALL restore the previous order.
|
|
|
|
#### Scenario: Undo reverts move-up
|
|
- **WHEN** the user moves a sublayer up and then presses Ctrl+Z
|
|
- **THEN** the layer returns to its previous position in the stack
|