fix: open anchor picker popups with a blank text field - #65
Merged
Merged
Conversation
The A and Alt-A popups share the forked TabTabTabWidget, whose create() stamps the last-created node's name into the input. show() previously called selectAll() to preserve that text. Clear the input on every show() instead so the anchor picker and navigate popups always present an empty field rather than the previous text.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts the anchor picker/navigate popup UI so that the text input is always blank when the popup opens, avoiding pre-filling with the last created/searched text.
Changes:
- Update
TabTabTabWidget.show()to clear the input field on every open (replacingselectAll()). - Update the
show()docstring to reflect the new “always blank on open” behavior and rationale.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
The A and Alt-A anchor popups now always open with a blank text field instead of pre-filling the previously created/searched text.
Both shortcuts share the forked
TabTabTabWidgetintabtabtab_anchors.py. Itscreate()method stamps the last-created node's name into the input field, andshow()previously calledself.input.selectAll()to preserve that text (so you could type over it or Tab-Tab to recreate it).show()now callsself.input.clear()so the picker and navigate popups always present an empty field.Scope
tabtabtab_anchors.pyis a dedicated fork used only by the anchor pickers inanchor.py, so this affects exactly the A (anchor_shortcut) and Alt-A (select_anchor_and_navigate) popups — Nuke's own Tab menu is untouched.Trade-off
This retires the old "reopen and press Tab/Enter on the still-present previous text to recreate it" behaviour, since the field no longer carries text forward. Weight-based ranking (most-used item pre-selected) still works.
Testing