Skip to content

Commit

Permalink
Fix curve edit set point position
Browse files Browse the repository at this point in the history
  • Loading branch information
aryan-11825114 committed Oct 5, 2024
1 parent db66bd3 commit 29bf9a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions editor/plugins/curve_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,11 +545,11 @@ void CurveEdit::set_point_position(int p_index, Vector2 p_pos) {
// Note: Changing the offset may modify the order.
EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Modify Curve Point"));
undo_redo->add_do_method(*curve, "set_point_value", initial_grab_index, p_pos.y);
undo_redo->add_do_method(*curve, "set_point_offset", initial_grab_index, p_pos.x);
undo_redo->add_do_method(*curve, "set_point_offset", p_index, p_pos.x);
undo_redo->add_do_method(*curve, "set_point_value", p_index, p_pos.y);
undo_redo->add_do_method(this, "set_selected_index", p_index);
undo_redo->add_undo_method(*curve, "set_point_value", p_index, initial_grab_pos.y);
undo_redo->add_undo_method(*curve, "set_point_offset", p_index, initial_grab_pos.x);
undo_redo->add_undo_method(*curve, "set_point_value", p_index, initial_grab_pos.y);
undo_redo->add_undo_method(this, "set_selected_index", initial_grab_index);
undo_redo->commit_action();
}
Expand Down

0 comments on commit 29bf9a1

Please sign in to comment.