summaryrefslogtreecommitdiffstats
path: root/editor/editor_log.cpp
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2022-03-25 18:06:46 +0100
committerkobewi <kobewi4e@gmail.com>2022-08-22 18:05:10 +0200
commitece3df39386af85b069cbb67ae1893b4365f1bd3 (patch)
tree6d815d51c6e043470a08ad1eab993e4b288da8c9 /editor/editor_log.cpp
parent99548e521dc049b609347cd1fe38262d59d1b0d6 (diff)
downloadredot-engine-ece3df39386af85b069cbb67ae1893b4365f1bd3.tar.gz
Add per-scene UndoRedo
Diffstat (limited to 'editor/editor_log.cpp')
-rw-r--r--editor/editor_log.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp
index 8aa099ddff..dc03a1f270 100644
--- a/editor/editor_log.cpp
+++ b/editor/editor_log.cpp
@@ -224,6 +224,10 @@ void EditorLog::set_tool_button(Button *p_tool_button) {
tool_button = p_tool_button;
}
+void EditorLog::register_undo_redo(UndoRedo *p_undo_redo) {
+ p_undo_redo->set_commit_notify_callback(_undo_redo_cbk, this);
+}
+
void EditorLog::_undo_redo_cbk(void *p_self, const String &p_name) {
EditorLog *self = static_cast<EditorLog *>(p_self);
self->add_message(p_name, EditorLog::MSG_TYPE_EDITOR);
@@ -458,8 +462,6 @@ EditorLog::EditorLog() {
add_error_handler(&eh);
current = Thread::get_caller_id();
-
- EditorNode::get_undo_redo()->set_commit_notify_callback(_undo_redo_cbk, this);
}
void EditorLog::deinit() {