Skip to content

Fix PROPERTY_HINT_GROUP_ENABLE display on hover #108264

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

lodetrick
Copy link
Contributor

@lodetrick lodetrick commented Jul 4, 2025

Fixes #108257

This PR fixes a regression by making it so unchecked sections do not show the hovered highlight. This PR syncs the gui_input()'s understanding of the hover with the NOTIFICATION_DRAW, as there were issues with the hover hint becoming out of sync.

@Chaosus Chaosus added this to the 4.5 milestone Jul 4, 2025
@AThousandShips AThousandShips requested a review from a team July 4, 2025 08:10
@lodetrick lodetrick force-pushed the group-enable-hover branch from a01590b to b1ccac7 Compare July 5, 2025 01:09
@@ -2166,11 +2168,11 @@ void EditorInspectorSection::setup(const String &p_section, const String &p_labe

void EditorInspectorSection::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
bool has_children_to_show = vbox->get_child_count(false) != 0;
bool can_click_unfold = vbox->get_child_count(false) != 0 && !(!checkbox_only && checkable && !checked);
Copy link
Member

@KoBeWi KoBeWi Jul 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh, double negation. I think the condition can be something like

Suggested change
bool can_click_unfold = vbox->get_child_count(false) != 0 && !(!checkbox_only && checkable && !checked);
bool can_click_unfold = vbox->get_child_count(false) != 0 && (checkbox_only || !checkable || checked);

Though it's arguable which one is more readable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion the double negation is more readable because it is checking against a single case (is how I thought about it), I reorganized it which made the double negation more apparent, I could change it back to:

Suggested change
bool can_click_unfold = vbox->get_child_count(false) != 0 && !(!checkbox_only && checkable && !checked);
bool can_click_unfold = vbox->get_child_count(false) != 0 && !(checkable && !checked && !checkbox_only);

@lodetrick lodetrick force-pushed the group-enable-hover branch from b1ccac7 to e9c5c71 Compare July 5, 2025 19:44
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.

Editor inspector section displays hover feedback even if non-actionable due to not containing any visible properties (unchecked checkbox)
3 participants