-
Notifications
You must be signed in to change notification settings - Fork 201
SG-41210: Add a per user undo-redo stack to Annotate Mode #1016
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
eloisebrosseau
merged 9 commits into
AcademySoftwareFoundation:main
from
eloisebrosseau:refactor-annotate-stack
Dec 10, 2025
Merged
SG-41210: Add a per user undo-redo stack to Annotate Mode #1016
eloisebrosseau
merged 9 commits into
AcademySoftwareFoundation:main
from
eloisebrosseau:refactor-annotate-stack
Dec 10, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bernie-laberge
approved these changes
Dec 4, 2025
Contributor
bernie-laberge
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful !
Well done @eloisebrosseau !
Not essential but perhaps we should bump the version of the Annotate package to 1.21 ?
| version: 1.20 |
4c889ae to
d684062
Compare
cedrik-fuoco-adsk
approved these changes
Dec 5, 2025
2bed777 to
d6a3230
Compare
Signed-off-by: Éloïse Brosseau <[email protected]>
Signed-off-by: Éloïse Brosseau <[email protected]>
Signed-off-by: Éloïse Brosseau <[email protected]>
Signed-off-by: Éloïse Brosseau <[email protected]>
Signed-off-by: Éloïse Brosseau <[email protected]>
Signed-off-by: Éloïse Brosseau <[email protected]>
Signed-off-by: Éloïse Brosseau <[email protected]>
Signed-off-by: Éloïse Brosseau <[email protected]>
Signed-off-by: Éloïse Brosseau <[email protected]>
b0c2e25 to
978f660
Compare
f309fee
into
AcademySoftwareFoundation:main
19 checks passed
Merged
bernie-laberge
pushed a commit
that referenced
this pull request
Dec 11, 2025
### Fix clearAllSlot ### Summarize your change. Add missing `}` for `if(!_skipConfirmations)`. ### Describe the reason for the change. While resolving the conflict between #1017 and #1016, the indentation of the code got changed and it resulted in a missing closing brace. Because of this issue, the following error is displayed in the console: `annotate_mode.mu, line 2210, char 41: method declaration not allowed in this context. Assertion failed: ((nparams == 0 && params == 0) || (nparams != 0 && params != 0)), function init, file Function.cpp, line 69.` Signed-off-by: Éloïse Brosseau <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SG-41210: Add a per user undo-redo stack to Annotate Mode
Summarize your change.
The undo, redo and clear actions in the Annotate Mode were refactored. A new undo property was added so that bringing back cleared annotations would be done through an
undoaction instead ofredo. Both the undo and redo properties were made per user via the username and process id values. AnundoClearAllFramesand aredoClearAllFramesproperties were also created to managed clearing annotations on the timeline. This action is special because in a context of multiple annotators, clearing can be done by anyone on any frames and specifically undone by the user who made the action. Basic undo and redo actions are per frame. However, undoing and redoing a clear of all the annotations on the timeline can be done on any frame.The undo, redo and clear button states were also updated to match this new implementation of the Annotate Mode. If the draw mode is
_Select(i.e. the cursor), all three buttons are disabled since the Annotate mode is not actually active anymore and the states were not updated in that case. Undoing, redoing and clearing annotations can only be done if a real drawing mode (e.g. pen or text) is selected to avoid issues with the buttons not being updated.This implementation is following this design:
Draw a paint stroke
Clear all on a frame
- Clear all frames on the timeline
Undo
Redo
Describe the reason for the change.
Some changes were needed to match the new product requirements around undo, redo and clear actions. This changes were mainly needed to handle multiple annotators simultaneously in a Live Review session.
Describe what you have tested and on which operating system.
Basic operations of drawing, undoing, redoing, clearing a frame, and clearing the timeline were tested on macOS 15.6.1