summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2022-10-28 02:54:55 +0200
committerkobewi <kobewi4e@gmail.com>2022-10-28 02:54:55 +0200
commitd7ebf725c9d83b6694802d18c36bab42b11759c7 (patch)
treebb198f368c73e03bd4d6660fbc9f4c2e32cb7846 /core
parent0486810697f8c22b190dd18e8d72ac18ef0664c3 (diff)
Fix nested actions in EditorUndoRedoManager
Diffstat (limited to 'core')
-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();