Skip to content

Editor: Update inspector group toggles visually #107857

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SmiterG
Copy link

@SmiterG SmiterG commented Jun 22, 2025

Currently, properties using PROPERTY_HINT_GROUP_ENABLE for inspector sections do not update their visual state (checkbox and folding) immediately when changed by external scripts (e.g., @tool scripts). This is because these properties do not create an EditorProperty instance, thus bypassing the standard update mechanism based on editor_property_map.

This commit introduces a new _toggle_sections HashMap in EditorInspector to specifically track and update these sections. When a property change is requested or during auto-refresh, if the property is a section toggle, its associated EditorInspectorSection will now be updated directly.

Fixes: #107826

Currently, properties using PROPERTY_HINT_GROUP_ENABLE for inspector sections
do not update their visual state (checkbox and folding) immediately when
changed by external scripts (e.g., @tool scripts). This is because these
properties do not create an EditorProperty instance, thus bypassing the
standard update mechanism based on �ditor_property_map.

This commit introduces a new _toggle_sections HashMap in EditorInspector
to specifically track and update these sections. When a property change is
requested or during auto-refresh, if the property is a section toggle,
its associated EditorInspectorSection will now be updated directly.
@SmiterG SmiterG marked this pull request as ready for review June 22, 2025 16:01
@AThousandShips AThousandShips changed the title fix(editor): Update inspector group toggles visually Editor: Update inspector group toggles visually Jun 22, 2025
@AThousandShips AThousandShips requested a review from a team June 22, 2025 16:17
@PedroPLopes1
Copy link

tá travando

@AThousandShips
Copy link
Member

@PedroPLopes1 The official language of these channels is English, please make any reports or comments in English, if you do not know English please use some translation software or ask for help.

@PedroPLopes1
Copy link

@PedroPLopes1 The official language of these channels is English, please make any reports or comments in English, if you do not know English please use some translation software or ask for help.

Eu peço desculpas.

Translation:

I ask excuses.

@lodetrick
Copy link
Contributor

lodetrick commented Jun 24, 2025

Sorry, I just saw this PR. This is also fixed by #107919 by necessity, I'm more in favor of that PR (it uses a pre-existing list rather than creating a new one) but I'll let maintainers decide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Toggleable Group Checkbox Doesn't Update in Inspector After External Change
4 participants