BUG: Fix box_handle_props initialization in PolygonSelector#31718
Open
lucaznch wants to merge 1 commit into
Open
BUG: Fix box_handle_props initialization in PolygonSelector#31718lucaznch wants to merge 1 commit into
lucaznch wants to merge 1 commit into
Conversation
QuLogic
reviewed
May 21, 2026
45071c9 to
c66fb6a
Compare
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.
PR summary
This PR fixes a bug in PolygonSelector where
box_handle_propsis incorrectly set to None because dict.update() returns None. Discovered while working on #31623.Why is this change necessary? / What problem does it solve?
When using PolygonSelector with
draw_bounding_box=True, any providedbox_handle_propsare not applied correctly. Instead the bounding box handles fall back to default props from RectangleSelector.What is the reasoning for this implementation?
The fix ensures
box_handle_propsinherits fromhandle_props, overrides are applied correctly, and the originalhandle_propsdictionary is not mutated.Example
The issue can be reproduced by specifying
box_handle_props:AI Disclosure
None.
PR checklist