summaryrefslogtreecommitdiff
path: root/editor/plugins/path_2d_editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/path_2d_editor_plugin.cpp')
-rw-r--r--editor/plugins/path_2d_editor_plugin.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/plugins/path_2d_editor_plugin.cpp b/editor/plugins/path_2d_editor_plugin.cpp
index 354475d268..a10eddb131 100644
--- a/editor/plugins/path_2d_editor_plugin.cpp
+++ b/editor/plugins/path_2d_editor_plugin.cpp
@@ -180,11 +180,11 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
// Check for segment split.
if (mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT && mode == MODE_EDIT && on_edge == true) {
- Vector2 gpoint = mb->get_position();
+ Vector2 gpoint2 = mb->get_position();
Ref<Curve2D> curve = node->get_curve();
int insertion_point = -1;
- float mbLength = curve->get_closest_offset(xform.affine_inverse().xform(gpoint));
+ float mbLength = curve->get_closest_offset(xform.affine_inverse().xform(gpoint2));
int len = curve->get_point_count();
for (int i = 0; i < len - 1; i++) {
float compareLength = curve->get_closest_offset(curve->get_point_position(i + 1));
@@ -195,7 +195,7 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
insertion_point = curve->get_point_count() - 2;
undo_redo->create_action(TTR("Split Curve"));
- undo_redo->add_do_method(curve.ptr(), "add_point", xform.affine_inverse().xform(gpoint), Vector2(0, 0), Vector2(0, 0), insertion_point + 1);
+ undo_redo->add_do_method(curve.ptr(), "add_point", xform.affine_inverse().xform(gpoint2), Vector2(0, 0), Vector2(0, 0), insertion_point + 1);
undo_redo->add_undo_method(curve.ptr(), "remove_point", insertion_point + 1);
undo_redo->add_do_method(canvas_item_editor, "update_viewport");
undo_redo->add_undo_method(canvas_item_editor, "update_viewport");
@@ -204,7 +204,7 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
action = ACTION_MOVING_POINT;
action_point = insertion_point + 1;
moving_from = curve->get_point_position(action_point);
- moving_screen_from = gpoint;
+ moving_screen_from = gpoint2;
canvas_item_editor->update_viewport();