fix: SG-44534: Fix missing text caret on push events - #1416
Open
eloisebrosseau wants to merge 1 commit into
Open
eloisebrosseau wants to merge 1 commit into
eloisebrosseau wants to merge 1 commit into
Conversation
eloisebrosseau
requested review from
bernie-laberge and
cedrik-fuoco-adsk
as code owners
September 16, 2026 19:24
Signed-off-by: Éloïse Brosseau <eloise.brosseau@autodesk.com>
eloisebrosseau
force-pushed
the
fix-annotation-text-caret
branch
from
September 16, 2026 19:25
2454553 to
93a1abb
Compare
cedrik-fuoco-adsk
approved these changes
Sep 17, 2026
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
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.
fix: SG-44534: Fix missing text caret on push events
Summarize your change.
Add the "|" placeholder on
on_push()events that are triggered when clicking on the viewport through_ensure_text_node(). Note that some other changes were needed to make sure undo-redo was properly updated with that new behaviour to avoid registering the text caret as a real annotation:_ensure_text_node()is now only responsible for creating a text node, and_register_text_undo()is responsible for updating the undo stack when a new text annotation is registered. This also fixed another issue where every text node was pushed onto the undo stack twice._frame_order_and_undo()was split into_add_to_order()and_register_undo_entry()to avoid counting a click without typing as an annotation._cancel_textwas updated to fix an issue where clicking on theEscapekey after typing would leave a stale undo entry that could be displayed again by clicking on undo, followed by redo.commit_text_if_active()toclear_frame()andclear_all_frames()to ensure any in-progress text annotation is committed or canceled before the frame is cleared, and avoid a desync between the node state and the undo stack.Describe the reason for the change.
When clicking on a frame with the text tool selected from the new annotation panel, no "|" placeholder was added to confirm that text would start being displayed at that position once the user would start to type.
Describe what you have tested and on which operating system.
Adding text annotations was tested on macOS.