summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-06-29 10:39:00 +0200
committerGitHub <noreply@github.com>2020-06-29 10:39:00 +0200
commitdffd805055cd8fe3c98ebd67c22e6883cdeacd76 (patch)
treeef2d7b96960f809ba541c037d3212caafea530db
parentb474e30136c0bc42abd84af5bc36137fe483f9a7 (diff)
parentb8d55b244a21112c454e01d7758f30ff1af3860c (diff)
Merge pull request #39824 from mrushyendra/snap_point_polygon
Fix possible accidental duplication of Polygon2D start point
-rw-r--r--editor/plugins/abstract_polygon_2d_editor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp
index e99ffe2b83..49e67f3605 100644
--- a/editor/plugins/abstract_polygon_2d_editor.cpp
+++ b/editor/plugins/abstract_polygon_2d_editor.cpp
@@ -369,7 +369,7 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
} else {
const real_t grab_threshold = EDITOR_GET("editors/poly_editor/point_grab_radius");
- if (!_is_line() && wip.size() > 1 && xform.xform(wip[0]).distance_to(gpoint) < grab_threshold) {
+ if (!_is_line() && wip.size() > 1 && xform.xform(wip[0]).distance_to(xform.xform(cpoint)) < grab_threshold) {
//wip closed
_wip_close();