Menu: Edit - setiastro/setiastrosuitepro GitHub Wiki
Edit Menu
The Edit menu provides per-document history control: Undo and Redo.
Undo
-
What it does: Steps the active image one edit backward.
-
Scope: Affects only the active document/view (not global).
-
Details:
- Each edit pushes the previous state to an undo stack with a human-readable step name (e.g., “Edit”, or a tool-provided name).
- You can check if undo is possible (
can_undo). - When you Undo, the reverted state is pushed onto Redo.
Redo
-
What it does: Steps forward to the next state after an Undo.
-
Scope: Per document.
-
Details:
- Available only after at least one Undo (
can_redo). - Performing a new edit after Undo clears the Redo stack (standard behavior).
- Available only after at least one Undo (
How history works (under the hood)
-
Every edit uses
ImageDocument.apply_edit(...)which:- Saves the current
(image, metadata, step_name)onto Undo. - Clears Redo.
- Sets the new image/metadata and emits
changed.
- Saves the current
-
Helpers exist to query history:
can_undo(),can_redo()last_undo_name(),last_redo_name()get_undo_stack()returns labeled steps (oldest→newest before current).
-
History is persisted in Projects:
- Save Project… writes both undo and redo stacks.
- Load Project… restores them, so you can keep undoing/redoing after reopening.
Notes & tips
- New edits clear Redo: If you want to keep the ability to step forward, Redo before making new changes.
- Closing a view with edits: If a document has undo history, the app asks for confirmation when closing that view to prevent accidental loss of work.
- Per-view layers/overlays: Visual composites happen in the view; Undo/Redo tracks the document image and metadata steps.