diff options
author | George L. Albany <Megacake1234@gmail.com> | 2024-11-26 19:30:58 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-26 19:30:58 +0000 |
commit | b06d20bf39d15ec736d08d4e4fcb32e0c3c1ce1e (patch) | |
tree | 79c2a4c34f2d888ff962d76edf474c518d1abdea /scene/main/viewport.cpp | |
parent | c5b1645e60a59c0292c04bece3fdb0715a61afea (diff) | |
parent | e58e18261ea7ed3978146ef8d77a900be2601be3 (diff) | |
download | redot-engine-b06d20bf39d15ec736d08d4e4fcb32e0c3c1ce1e.tar.gz |
Merge pull request #885 from Spartan322/merge/d09d82d
Merge commit godotengine/godot@d09d82d
Diffstat (limited to 'scene/main/viewport.cpp')
-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; + } } } |