-
-
Notifications
You must be signed in to change notification settings - Fork 22.7k
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
base: master
Are you sure you want to change the base?
Conversation
a01590b
to
b1ccac7
Compare
@@ -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); |
There was a problem hiding this comment.
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
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.
There was a problem hiding this comment.
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:
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); |
b1ccac7
to
e9c5c71
Compare
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 theNOTIFICATION_DRAW
, as there were issues with the hover hint becoming out of sync.