From 1799189202e5b0178222cc1d241931d42378885a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Pu=C5=82awski?= <31245410+pulawskig@users.noreply.github.com> Date: Sun, 7 Aug 2022 15:10:28 +0200 Subject: [PATCH] Fix axis snapping of CollisionPolygon2d's newly created vertex (cherry picked from commit ba58491ca724bd660257bf4c5a3d76d70a15ad3e) --- editor/plugins/abstract_polygon_2d_editor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp index 16539e7450d..ae28ec0baec 100644 --- a/editor/plugins/abstract_polygon_2d_editor.cpp +++ b/editor/plugins/abstract_polygon_2d_editor.cpp @@ -319,9 +319,9 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref &p_event) return true; } else { Vector vertices2 = _get_polygon(insert.polygon); - pre_move_edit = vertices2; edited_point = PosVertex(insert.polygon, insert.vertex + 1, xform.affine_inverse().xform(insert.pos)); vertices2.insert(edited_point.vertex, edited_point.pos); + pre_move_edit = vertices2; selected_point = edited_point; edge_point = PosVertex();