mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 07:53:26 +00:00
Make EditorProperty
and its child EditorProperties behave more like sibling nodes
Let `EditorProperty::gui_input()` no longer handle mouse events that
occur in the child EditorProperty rect.
(cherry picked from commit 62aa4a6f9e
)
This commit is contained in:
parent
ba27815166
commit
72ad4a2f36
3 changed files with 4 additions and 5 deletions
|
@ -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 when handling mouse events.
|
||||
}
|
||||
if (is_layout_rtl()) {
|
||||
mpos.x = get_size().x - mpos.x;
|
||||
}
|
||||
|
@ -2715,8 +2718,6 @@ VBoxContainer *EditorInspectorArray::get_vbox(int p_index) {
|
|||
EditorInspectorArray::EditorInspectorArray(bool p_read_only) {
|
||||
read_only = p_read_only;
|
||||
|
||||
set_mouse_filter(Control::MOUSE_FILTER_STOP);
|
||||
|
||||
odd_style.instantiate();
|
||||
even_style.instantiate();
|
||||
|
||||
|
|
|
@ -3303,11 +3303,11 @@ void EditorPropertyResource::update_property() {
|
|||
sub_inspector->set_use_folding(is_using_folding());
|
||||
|
||||
sub_inspector->set_draw_focus_border(false);
|
||||
sub_inspector->set_focus_mode(FocusMode::FOCUS_NONE);
|
||||
|
||||
sub_inspector->set_use_filter(use_filter);
|
||||
sub_inspector->register_text_enter(parent_inspector->search_box);
|
||||
|
||||
sub_inspector->set_mouse_filter(MOUSE_FILTER_STOP);
|
||||
add_child(sub_inspector);
|
||||
set_bottom_editor(sub_inspector);
|
||||
|
||||
|
|
|
@ -430,7 +430,6 @@ void EditorPropertyArray::update_property() {
|
|||
|
||||
if (!container) {
|
||||
container = memnew(PanelContainer);
|
||||
container->set_mouse_filter(MOUSE_FILTER_STOP);
|
||||
add_child(container);
|
||||
set_bottom_editor(container);
|
||||
|
||||
|
@ -1208,7 +1207,6 @@ void EditorPropertyDictionary::update_property() {
|
|||
|
||||
if (!container) {
|
||||
container = memnew(PanelContainer);
|
||||
container->set_mouse_filter(MOUSE_FILTER_STOP);
|
||||
add_child(container);
|
||||
set_bottom_editor(container);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue