mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Add per-scene UndoRedo
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user