diff options
author | Uxeron <vgabrielius123@gmail.com> | 2022-11-18 19:10:57 +0200 |
---|---|---|
committer | Uxeron <vgabrielius123@gmail.com> | 2022-11-18 19:10:57 +0200 |
commit | 721e51ac28f78c3553418651c205d6b3ac67bfde (patch) | |
tree | c72adb5b160e98873312347f7a99031d312bc092 /scene/main | |
parent | d93bec61c3e8f5e047f12ae3ce6a68fbc7a37273 (diff) |
Fixed _get_drag_data getting incorrect position on scaled controls
Diffstat (limited to 'scene/main')
-rw-r--r-- | scene/main/viewport.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 4c2a761138..9e440405af 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1623,7 +1623,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { Control *control = Object::cast_to<Control>(ci); if (control) { gui.dragging = true; - gui.drag_data = control->get_drag_data(control->get_global_transform_with_canvas().affine_inverse().xform(mpos) - gui.drag_accum); + gui.drag_data = control->get_drag_data(control->get_global_transform_with_canvas().affine_inverse().xform(mpos - gui.drag_accum)); if (gui.drag_data.get_type() != Variant::NIL) { gui.mouse_focus = nullptr; gui.forced_mouse_focus = false; |