Expose EditorUndoRedoManager's clear_history()

This commit is contained in:
kobewi
2024-04-02 13:33:12 +02:00
parent fd7239cfab
commit ad7a2d19a6
11 changed files with 47 additions and 18 deletions

View File

@ -6887,8 +6887,8 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
_redraw_tracks();
_update_key_edit();
EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->clear_history(true, undo_redo->get_history_id_for_object(animation.ptr()));
undo_redo->clear_history(true, undo_redo->get_history_id_for_object(this));
undo_redo->clear_history(undo_redo->get_history_id_for_object(animation.ptr()));
undo_redo->clear_history(undo_redo->get_history_id_for_object(this));
} break;
case EDIT_CLEAN_UP_ANIMATION: {
@ -7030,8 +7030,8 @@ void AnimationTrackEditor::_cleanup_animation(Ref<Animation> p_animation) {
}
EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->clear_history(true, undo_redo->get_history_id_for_object(animation.ptr()));
undo_redo->clear_history(true, undo_redo->get_history_id_for_object(this));
undo_redo->clear_history(undo_redo->get_history_id_for_object(animation.ptr()));
undo_redo->clear_history(undo_redo->get_history_id_for_object(this));
_update_tracks();
}