Merge pull request #59709 from Sauermann/fix-dragndrop-subviewport-transform

This commit is contained in:
Rémi Verschelde 2022-03-31 22:31:59 +02:00 committed by GitHub
commit 1358efde1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1851,8 +1851,10 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
}
if (viewport_under) {
Transform2D ai = (viewport_under->get_final_transform().affine_inverse() * viewport_under->_get_input_pre_xform());
viewport_pos = ai.xform(viewport_pos);
if (viewport_under != this) {
Transform2D ai = (viewport_under->get_final_transform().affine_inverse() * viewport_under->_get_input_pre_xform());
viewport_pos = ai.xform(viewport_pos);
}
// Find control under at position.
gui.drag_mouse_over = viewport_under->gui_find_control(viewport_pos);
if (gui.drag_mouse_over) {