-
-
Notifications
You must be signed in to change notification settings - Fork 21.9k
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
Make EditorProperty
and its child EditorProperty
behave like sibling nodes when handling mouse events
#103316
Make EditorProperty
and its child EditorProperty
behave like sibling nodes when handling mouse events
#103316
Conversation
df322b8
to
5b2d73f
Compare
EditorProperty
and its child EditorProperty
behave like sibling nodes
Why is this chosen for 4.5? This is a fix for a common issue, not a new feature, #101768 did not solve the issue completely. |
What case wasn't solved? |
Also we are in the RC phase and we merge only critical fixes currently |
I can still see the inspector shifting abruptly when expanding some properties, such as when editing a material. 0226.mp4 |
Tested this PR and while folding now works properly, toggling some properties can still cause jumps: godot.windows.editor.dev.x86_64_FeyJMyZthI.mp4It's caused by inspector refresh though, and the scroll ends up in the same position, so it's fine. |
editor/editor_inspector.cpp
Outdated
@@ -918,6 +918,9 @@ void EditorProperty::gui_input(const Ref<InputEvent> &p_event) { | |||
|
|||
if (me.is_valid()) { | |||
Vector2 mpos = me->get_position(); | |||
if (bottom_child_rect.has_point(mpos)) { | |||
return; // Makes child EditorProperties behave like sibling nodes. |
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.
How does that work exactly?
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.
Just when handling mouse events.
In this case, when clicking on the Label
of a child EditorProperty
, we don't want the parent EditorProperty
's menu to pop up (RMB), but we want the root inspector to have focus (LMB).
… sibling nodes Let `EditorProperty::gui_input()` no longer handle mouse events that occur in the child EditorProperty rect.
5b2d73f
to
62aa4a6
Compare
EditorProperty
and its child EditorProperty
behave like sibling nodesEditorProperty
and its child EditorProperty
behave like sibling nodes when handling mouse events
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.
Thanks! |
Cherry-picked for 4.4.1. |
Let
EditorProperty::gui_input()
no longer handle mouse events that occur in the child EditorProperty rect (bottom_child_rect
).This is another way to solve issues like #88848 , but avoids #100695 .
Bugsquad edit:
Fix #103578