feat(localize): P copies the previous frame's box onto the current frame - #386
Merged
Conversation
In the object editor, P replaces the current frame's box with the one the nearest earlier lane frame shows — its committed box, or the winning pick it would commit if undecided. Cleared and boxless frames are skipped. The copied geometry commits with a human origin: no model proposed it on this frame, a person placed it there. No-ops: nothing earlier shows a box, the frame is out of range (a peeked gap frame), and auto-repeat — the save is async, same reasoning as Delete.
Review follow-ups on the P shortcut: - Ctrl/Cmd/Alt+P is the browser's shortcut (print, most visibly) — the handler now leaves it alone instead of writing a box AND suppressing the print dialog. Same line the page-level handler draws. - P no longer writes behind the shortcuts sheet or the accept popover. Unlike the view toggles it commits data, and the sheet documents P — an invitation to press it while the sheet is open. - The out-of-range no-op test now starts from the last frame, where a previous box exists to copy; from the first frame it passed with the guard deleted (verified by mutation). - copyPrevious routes through commitCandidate instead of restating its body.
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.
What
A new keyboard shortcut in the localize object editor:
Preplaces the current frame's box with the box the previous frame shows for this object.Behavior
origin: human— no model proposed it on this frame; a person placed it there.Delete).?): "Copy the previous frame's box here — P".Why
When the model's box on a frame is bad or missing but the plume barely moved since the previous frame, the annotator currently has to redraw by hand what the previous frame already got right.
Testing
previousShownBoxunit tests: committed box, winning-pick fallback, skipping cleared/boxless frames, null when nothing earlier shows a box, null on the first frame.npm run qualitygreen.