summaryrefslogtreecommitdiff
path: root/core/object
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-11-14 18:29:46 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-11-14 18:29:46 +0100
commitbeed90ea6d4a3e779a115622776206cc6b052a6c (patch)
tree1d374a943ab621e2cdcb4059ff72cad4c2339f48 /core/object
parent4d9adfea23f193d51f8a53371d311a9595320655 (diff)
parentd7ebf725c9d83b6694802d18c36bab42b11759c7 (diff)
Merge pull request #67963 from KoBeWi/den_of_actions
Fix nested actions in EditorUndoRedoManager
Diffstat (limited to 'core/object')
-rw-r--r--core/object/undo_redo.cpp4
-rw-r--r--core/object/undo_redo.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/core/object/undo_redo.cpp b/core/object/undo_redo.cpp
index aa66e86bc0..9f8a1de697 100644
--- a/core/object/undo_redo.cpp
+++ b/core/object/undo_redo.cpp
@@ -423,6 +423,10 @@ String UndoRedo::get_current_action_name() const {
return actions[current_action].name;
}
+int UndoRedo::get_action_level() const {
+ return action_level;
+}
+
bool UndoRedo::has_undo() const {
return current_action >= 0;
}
diff --git a/core/object/undo_redo.h b/core/object/undo_redo.h
index c7c58697c3..9c6d2d10ed 100644
--- a/core/object/undo_redo.h
+++ b/core/object/undo_redo.h
@@ -120,6 +120,7 @@ public:
bool redo();
bool undo();
String get_current_action_name() const;
+ int get_action_level() const;
int get_history_count();
int get_current_action();