Skip to content

Commit

Permalink
Merge pull request #68842 from Uxeron/DragPositionFix
Browse files Browse the repository at this point in the history
Fixed `_get_drag_data` getting incorrect position on a scaled `Control`
  • Loading branch information
akien-mga committed Nov 18, 2022
2 parents 1bc131a + 721e51a commit 84c404f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/main/viewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 84c404f

Please sign in to comment.