@@ -225,17 +225,20 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
225225 break ;
226226
227227 case ACTION_MOVING_POINT:
228- case ACTION_MOVING_NEW_POINT: {
229228 if (original_mouse_pos != gpoint) {
230- if (action == ACTION_MOVING_POINT) {
231- undo_redo->create_action (TTR (" Move Point in Curve" ));
232- undo_redo->add_undo_method (curve.ptr (), " set_point_position" , action_point, moving_from);
233- }
229+ undo_redo->create_action (TTR (" Move Point in Curve" ));
230+ undo_redo->add_undo_method (curve.ptr (), " set_point_position" , action_point, moving_from);
234231 undo_redo->add_do_method (curve.ptr (), " set_point_position" , action_point, cpoint);
235232 undo_redo->add_do_method (canvas_item_editor, " update_viewport" );
236233 undo_redo->add_undo_method (canvas_item_editor, " update_viewport" );
237234 undo_redo->commit_action (false );
238235 }
236+ break ;
237+ case ACTION_MOVING_NEW_POINT: {
238+ undo_redo->add_do_method (curve.ptr (), " set_point_position" , action_point, cpoint);
239+ undo_redo->add_undo_method (canvas_item_editor, " update_viewport" );
240+ undo_redo->add_do_method (canvas_item_editor, " update_viewport" );
241+ undo_redo->commit_action (false );
239242 } break ;
240243
241244 case ACTION_MOVING_IN: {
0 commit comments