From 681769e2c91124057d0421c44ff1e6582d926483 Mon Sep 17 00:00:00 2001 From: kobewi Date: Wed, 3 Jul 2024 15:14:51 +0200 Subject: Fix undoredo handling in some dialogs --- editor/project_settings_editor.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'editor/project_settings_editor.cpp') diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index 943e345e97..bdf4e41c5f 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -235,28 +235,17 @@ void ProjectSettingsEditor::_select_type(Variant::Type p_type) { } void ProjectSettingsEditor::shortcut_input(const Ref &p_event) { - ERR_FAIL_COND(p_event.is_null()); - EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton(); - const Ref k = p_event; if (k.is_valid() && k->is_pressed()) { bool handled = false; if (ED_IS_SHORTCUT("ui_undo", p_event)) { - String action = undo_redo->get_current_action_name(); - if (!action.is_empty()) { - EditorNode::get_log()->add_message(vformat(TTR("Undo: %s"), action), EditorLog::MSG_TYPE_EDITOR); - } - undo_redo->undo(); + EditorNode::get_singleton()->undo(); handled = true; } if (ED_IS_SHORTCUT("ui_redo", p_event)) { - undo_redo->redo(); - String action = undo_redo->get_current_action_name(); - if (!action.is_empty()) { - EditorNode::get_log()->add_message(vformat(TTR("Redo: %s"), action), EditorLog::MSG_TYPE_EDITOR); - } + EditorNode::get_singleton()->redo(); handled = true; } -- cgit v1.2.3