From ece3df39386af85b069cbb67ae1893b4365f1bd3 Mon Sep 17 00:00:00 2001 From: kobewi Date: Fri, 25 Mar 2022 18:06:46 +0100 Subject: Add per-scene UndoRedo --- editor/animation_track_editor.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'editor/animation_track_editor.h') diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h index a785f5aec7..42238d8c72 100644 --- a/editor/animation_track_editor.h +++ b/editor/animation_track_editor.h @@ -78,7 +78,7 @@ class AnimationTimelineEdit : public Range { void _anim_loop_pressed(); void _play_position_draw(); - UndoRedo *undo_redo = nullptr; + Ref undo_redo; Rect2 hsize_rect; bool editing = false; @@ -112,7 +112,7 @@ public: void set_track_edit(AnimationTrackEdit *p_track_edit); void set_zoom(Range *p_zoom); Range *get_zoom() const { return zoom; } - void set_undo_redo(UndoRedo *p_undo_redo); + void set_undo_redo(Ref p_undo_redo); void set_play_position(float p_pos); float get_play_position() const; @@ -153,7 +153,7 @@ class AnimationTrackEdit : public Control { }; AnimationTimelineEdit *timeline = nullptr; - UndoRedo *undo_redo = nullptr; + Ref undo_redo; Popup *path_popup = nullptr; LineEdit *path = nullptr; Node *root = nullptr; @@ -234,12 +234,12 @@ public: Ref get_animation() const; AnimationTimelineEdit *get_timeline() const { return timeline; } AnimationTrackEditor *get_editor() const { return editor; } - UndoRedo *get_undo_redo() const { return undo_redo; } + Ref get_undo_redo() const; NodePath get_path() const; void set_animation_and_track(const Ref &p_animation, int p_track, bool p_read_only); virtual Size2 get_minimum_size() const override; - void set_undo_redo(UndoRedo *p_undo_redo); + void set_undo_redo(Ref p_undo_redo); void set_timeline(AnimationTimelineEdit *p_timeline); void set_editor(AnimationTrackEditor *p_editor); void set_root(Node *p_root); @@ -334,7 +334,7 @@ class AnimationTrackEditor : public VBoxContainer { void _animation_track_remove_request(int p_track, Ref p_from_animation); void _track_grab_focus(int p_track); - UndoRedo *undo_redo = nullptr; + Ref undo_redo; void _update_scroll(double); void _update_step(double p_new_step); -- cgit v1.2.3