diff options
author | Spartan322 <Megacake1234@gmail.com> | 2024-11-26 12:56:19 -0500 |
---|---|---|
committer | Spartan322 <Megacake1234@gmail.com> | 2024-11-26 12:56:19 -0500 |
commit | e58e18261ea7ed3978146ef8d77a900be2601be3 (patch) | |
tree | 79c2a4c34f2d888ff962d76edf474c518d1abdea /scene/main | |
parent | c5b1645e60a59c0292c04bece3fdb0715a61afea (diff) | |
parent | d09d82d433b03bb3773fd2a8cc8d6ccc2f8739ce (diff) | |
download | redot-engine-e58e18261ea7ed3978146ef8d77a900be2601be3.tar.gz |
Merge commit godotengine/godot@d09d82d433b03bb3773fd2a8cc8d6ccc2f8739ce
Diffstat (limited to 'scene/main')
-rw-r--r-- | scene/main/viewport.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index dabd1dbe07..f66d39dbad 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -3067,6 +3067,14 @@ void Viewport::_update_mouse_over(Vector2 p_pos) { } v->_update_mouse_over(v->get_final_transform().affine_inverse().xform(pos)); } + + Viewport *section_root = get_section_root_viewport(); + if (section_root && c->is_consume_drag_and_drop_enabled()) { + // Evaluating `consume_drag_and_drop` and adjusting target_control needs to happen + // after `_update_mouse_over` in the SubViewports, because otherwise physics picking + // would not work inside SubViewports. + section_root->gui.target_control = over; + } } } |