summaryrefslogtreecommitdiff
path: root/scene/gui/control.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-03-31 11:06:55 +0200
committerGitHub <noreply@github.com>2022-03-31 11:06:55 +0200
commit755e28e88858f796c99067cd32f3894d37700031 (patch)
tree4bc311a3596fe3ac3b97f2232617a03d42524feb /scene/gui/control.cpp
parentb7850bb1e8e235b60075b14a9b2ccf2dc0ce4a50 (diff)
parent04728395095835f1d9517f36dd842baa124598f9 (diff)
Merge pull request #59706 from Sauermann/fix-control-warp-mouse-canvas-transform
Fix Control::warp_mouse to respect canvas transform
Diffstat (limited to 'scene/gui/control.cpp')
-rw-r--r--scene/gui/control.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index f0d4ec54ee..2f96ee675f 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -2939,7 +2939,7 @@ Control::MouseFilter Control::get_mouse_filter() const {
void Control::warp_mouse(const Point2 &p_position) {
ERR_FAIL_COND(!is_inside_tree());
- get_viewport()->warp_mouse(get_global_transform().xform(p_position));
+ get_viewport()->warp_mouse(get_global_transform_with_canvas().xform(p_position));
}
bool Control::is_text_field() const {