Fix incorrect drag preview position under transformed CanvasLayer.
This commit is contained in:
parent
4c4e673344
commit
3e30dd7954
1 changed files with 2 additions and 1 deletions
|
@ -1987,7 +1987,8 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
|
||||||
|
|
||||||
Control *drag_preview = _gui_get_drag_preview();
|
Control *drag_preview = _gui_get_drag_preview();
|
||||||
if (drag_preview) {
|
if (drag_preview) {
|
||||||
drag_preview->set_position(mpos);
|
Vector2 pos = drag_preview->get_canvas_transform().affine_inverse().xform(mpos);
|
||||||
|
drag_preview->set_position(pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
gui.drag_mouse_over = section_root->gui.target_control;
|
gui.drag_mouse_over = section_root->gui.target_control;
|
||||||
|
|
Loading…
Reference in a new issue