Implement Undo/Redo #4
No reviewers
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: enrico/stiletto#4
Loading…
Reference in New Issue
No description provided.
Delete Branch "undo_redo"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
It seems to be working correctly.
Before the merge I would like a brief review, because I changed some bits.
I introduced a type alias
CanvasforVector<CanvasElement>to make signatures shorter, maybe a better name is due, (possibly we want an Abstract Data Type here, so we can abstract on the data structure, but not on this branch)@ -39,0 +84,4 @@// so we first check if there are newer versions, if so// this means we are in the past, so a change in the past destroys the future// and creates a new future. If we want to keep all ramifications, we should use a tree,// but honestly, this sounds like overkill.I agree, I’ll leave out this consideration before pushing
@ -26,2 +26,3 @@current_element: Option<CanvasElement>,elements: Vector<CanvasElement>,//elements: Vector<CanvasElement>,history: History,We could give it a more descriptive name, maybe VersionedCanvas?