summaryrefslogtreecommitdiffstats
path: root/scene/main
diff options
context:
space:
mode:
authorThaddeus Crews <repiteo@outlook.com>2024-11-21 17:56:48 -0600
committerThaddeus Crews <repiteo@outlook.com>2024-11-21 17:56:48 -0600
commit0eca686191d0c90735b93ef5d97a1df3e6b53d75 (patch)
treef765f475bd9d2e65b9ba64e0ab3534d088bfdaa8 /scene/main
parent38ebcf92edb6d4f3e8ab490d40be2783fb27aeb5 (diff)
parent117158d2718d11c5026f4e2791c7784b4815d0aa (diff)
downloadredot-engine-0eca686191d0c90735b93ef5d97a1df3e6b53d75.tar.gz
Merge pull request #99270 from Sauermann/fix-svc-drop-config
Introduce a `SubViewportContainer` config for drag-and-drop target locations
Diffstat (limited to 'scene/main')
-rw-r--r--scene/main/viewport.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index b66cfb516a..a0f39462a0 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -3060,6 +3060,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;
+ }
}
}