mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Add a way to force history for undoredo
This commit is contained in:
parent
95110ddcb4
commit
57e046541d
5 changed files with 33 additions and 2 deletions
|
|
@ -67,6 +67,7 @@ private:
|
|||
HashMap<int, History> history_map;
|
||||
Action pending_action;
|
||||
|
||||
bool forced_history = false;
|
||||
bool is_committing = false;
|
||||
|
||||
History *_get_newest_undo();
|
||||
|
|
@ -79,6 +80,7 @@ public:
|
|||
UndoRedo *get_history_undo_redo(int p_idx) const;
|
||||
int get_history_id_for_object(Object *p_object) const;
|
||||
History &get_history_for_object(Object *p_object);
|
||||
void force_fixed_history();
|
||||
|
||||
void create_action_for_history(const String &p_name, int p_history_id, UndoRedo::MergeMode p_mode = UndoRedo::MERGE_DISABLE, bool p_backward_undo_ops = false);
|
||||
void create_action(const String &p_name = "", UndoRedo::MergeMode p_mode = UndoRedo::MERGE_DISABLE, Object *p_custom_context = nullptr, bool p_backward_undo_ops = false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue