From d7ebf725c9d83b6694802d18c36bab42b11759c7 Mon Sep 17 00:00:00 2001 From: kobewi Date: Fri, 28 Oct 2022 02:54:55 +0200 Subject: Fix nested actions in EditorUndoRedoManager --- core/object/undo_redo.cpp | 4 ++++ core/object/undo_redo.h | 1 + 2 files changed, 5 insertions(+) (limited to 'core/object') 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(); -- cgit v1.2.3