Repository navigation
Re-place the viewport toolbar when its context changes - #1381
Merged
Merged
Conversation
saworbit
enabled auto-merge (squash)
October 21, 2026 00:30
2 tasks
This was referenced Oct 21, 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.
The viewport toolbar took its width only in
_forward_3d_force_draw_over_viewport. A selection made in the Scene dock changes the toolbar's buttons but gives the viewport no input to redraw for. So the toolbar kept the old context's width, and the brush tools wrapped into a column one button wide down the viewport. Found while capturing the structure piece shot (#1370, PR #1376).HFPluginHud.update_context_toolbar_state()callsHFPluginOverlays.refresh_viewport_overlay_placement()after it updates the toolbar. That re-anchors only when the toolbar's minimum size moved, which is the same cheap check the draw-over already runs every frame.Test:
test_a_selection_from_outside_the_viewport_widens_the_toolbar_at_onceintest_plugin_hud.gd, through the real plugin. The toolbar sits on a 1509 px host, nothing is selected, then a box is selected with no draw-over. Before the fix it stayed 268 px against a 1002 px brush row; after, it takes the brush row's width. Local: test_plugin_hud 9/9, test_viewport_overlay_host 19/19, test_context_toolbar 28/28, test_hotkey_palette 20/20, test_plugin_ (18 scripts, 225), CI lint, script warnings.Fixes #1375