From 0b6bcf90f534805708f3d0c4b16cdee03cf3cc21 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Sun, 10 May 2020 20:12:25 +0200 Subject: [PATCH] Rename the editor action "Revert Scene" to "Reload Saved Scene" This option can be used to workaround various issues with stuff not reloading properly when changes are made. The option was renamed to clarify the fact that it actually reloads the scene saved on the filesystem. (cherry picked from commit 2962819d1c4e3a3835647015904e07c93ecfc370) --- editor/editor_node.cpp | 9 +++++---- editor/editor_node.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index e89e063b948..729c1046c91 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -2352,7 +2352,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { } } break; - case EDIT_REVERT: { + case EDIT_RELOAD_SAVED_SCENE: { Node *scene = get_edited_scene(); @@ -2367,8 +2367,9 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { } if (unsaved_cache && !p_confirmed) { - confirmation->get_ok()->set_text(TTR("Revert")); - confirmation->set_text(TTR("This action cannot be undone. Revert anyway?")); + confirmation->get_ok()->set_text(TTR("Reload Saved Scene")); + confirmation->set_text( + TTR("The current scene has unsaved changes.\nReload the saved scene anyway? This action cannot be undone.")); confirmation->popup_centered_minsize(); break; } @@ -6147,7 +6148,7 @@ EditorNode::EditorNode() { p->add_shortcut(ED_SHORTCUT("editor/redo", TTR("Redo"), KEY_MASK_SHIFT + KEY_MASK_CMD + KEY_Z), EDIT_REDO, true); p->add_separator(); - p->add_shortcut(ED_SHORTCUT("editor/revert_scene", TTR("Revert Scene")), EDIT_REVERT); + p->add_shortcut(ED_SHORTCUT("editor/reload_saved_scene", TTR("Reload Saved Scene")), EDIT_RELOAD_SAVED_SCENE); p->add_shortcut(ED_SHORTCUT("editor/close_scene", TTR("Close Scene"), KEY_MASK_SHIFT + KEY_MASK_CMD + KEY_W), FILE_CLOSE); recent_scenes = memnew(PopupMenu); diff --git a/editor/editor_node.h b/editor/editor_node.h index c6c23df4620..0c547858a55 100644 --- a/editor/editor_node.h +++ b/editor/editor_node.h @@ -150,7 +150,7 @@ private: FILE_EXTERNAL_OPEN_SCENE, EDIT_UNDO, EDIT_REDO, - EDIT_REVERT, + EDIT_RELOAD_SAVED_SCENE, TOOLS_ORPHAN_RESOURCES, TOOLS_CUSTOM, RESOURCE_SAVE,