summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-11-18 23:32:08 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-11-18 23:32:08 +0100
commit84c404f6bcce9ba112118d77afd6bd70a92774d1 (patch)
treea5e128e102d6a1368322c2b0ac2a65a78484bbce /scene
parent1bc131afb88545b69bb886ddef9f143a23acb113 (diff)
parent721e51ac28f78c3553418651c205d6b3ac67bfde (diff)
Merge pull request #68842 from Uxeron/DragPositionFix
Fixed `_get_drag_data` getting incorrect position on a scaled `Control`
Diffstat (limited to 'scene')
-rw-r--r--scene/main/viewport.cpp2
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;