summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-01-24 23:38:30 +0100
committerGitHub <noreply@github.com>2019-01-24 23:38:30 +0100
commit6e65c73f71c2c28e0b186e632427cea399492f22 (patch)
treea6cdb980b1f4836bc4c4f68ec68cde2c76739af4 /editor/plugins
parentb32298a660f95abd94b7dc9e7ea68bd38150d149 (diff)
parent8676370aa52710112b8a3bc540f431c81a2290a6 (diff)
Merge pull request #25294 from groud/fix_2D_selection
Fixes Node2D selection not adapting to editor zoom level
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 02f6263887..2913c4ce56 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -474,7 +474,7 @@ void CanvasItemEditor::_find_canvas_items_at_pos(const Point2 &p_pos, Node *p_no
if (canvas_item && canvas_item->is_visible_in_tree()) {
Transform2D xform = (p_parent_xform * p_canvas_xform * canvas_item->get_transform()).affine_inverse();
- const real_t local_grab_distance = xform.basis_xform(Vector2(grab_distance, 0)).length();
+ const real_t local_grab_distance = xform.basis_xform(Vector2(grab_distance, 0)).length() / zoom;
if (canvas_item->_edit_is_selected_on_click(xform.xform(p_pos), local_grab_distance)) {
Node2D *node = Object::cast_to<Node2D>(canvas_item);