summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-03-13 22:10:16 +0100
committerGitHub <noreply@github.com>2022-03-13 22:10:16 +0100
commit4f40a71e03bccf8c508748ebba3f81f535ef9b98 (patch)
tree4650b19236ef60989f3ea23b8adff16c6b3c0390 /editor
parentcc6d051af29696fe326771dade859986f0871418 (diff)
parentbb5d130509156e48bdd22d68c780bfa69b28a270 (diff)
Merge pull request #57436 from AnilBK/change-scopes
Scope Changes for some variables.
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/abstract_polygon_2d_editor.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp
index 5a2696fff1..22e0a3dabb 100644
--- a/editor/plugins/abstract_polygon_2d_editor.cpp
+++ b/editor/plugins/abstract_polygon_2d_editor.cpp
@@ -292,15 +292,14 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
_commit_action();
return true;
} else {
- Vector<Vector2> vertices2 = _get_polygon(insert.polygon);
- pre_move_edit = vertices2;
+ pre_move_edit = vertices;
edited_point = PosVertex(insert.polygon, insert.vertex + 1, xform.affine_inverse().xform(insert.pos));
- vertices2.insert(edited_point.vertex, edited_point.pos);
+ vertices.insert(edited_point.vertex, edited_point.pos);
selected_point = Vertex(edited_point.polygon, edited_point.vertex);
edge_point = PosVertex();
undo_redo->create_action(TTR("Insert Point"));
- _action_set_polygon(insert.polygon, vertices2);
+ _action_set_polygon(insert.polygon, vertices);
_commit_action();
return true;
}