summaryrefslogtreecommitdiffstats
path: root/editor/project_settings_editor.cpp
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2024-07-03 15:14:51 +0200
committerkobewi <kobewi4e@gmail.com>2024-07-04 14:17:47 +0200
commit681769e2c91124057d0421c44ff1e6582d926483 (patch)
treeca9a5eaf8daa1c10fd9db983838d1c748f5504bc /editor/project_settings_editor.cpp
parent6a13fdcae3662975c101213d47a1eb3a7db63cb3 (diff)
downloadredot-engine-681769e2c91124057d0421c44ff1e6582d926483.tar.gz
Fix undoredo handling in some dialogs
Diffstat (limited to 'editor/project_settings_editor.cpp')
-rw-r--r--editor/project_settings_editor.cpp15
1 files changed, 2 insertions, 13 deletions
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<InputEvent> &p_event) {
- ERR_FAIL_COND(p_event.is_null());
- EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
-
const Ref<InputEventKey> 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;
}