mirror of
https://github.com/godotengine/godot
synced 2024-09-19 21:21:28 +00:00
Fixed _get_drag_data getting incorrect position on scaled controls
This commit is contained in:
parent
d93bec61c3
commit
721e51ac28
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue