diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-06-15 15:40:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-15 15:40:52 +0200 |
commit | fbdb1e0bab08e43312009a90580071003da333fd (patch) | |
tree | b4079dec050ca2749ba0e6e61979edb07171e461 /editor | |
parent | b5da5543db9cd71be5357a1fbcdef082867a034e (diff) | |
parent | a6984f8d28632c28bb6f0e2baa7ab61b6aef8a9c (diff) |
Merge pull request #49108 from LightningAA/reload-current-project-4.0
Add the ability to reload the current project
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_node.cpp | 4 | ||||
-rw-r--r-- | editor/editor_node.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 9a94597f0b..4f874687b4 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -2693,6 +2693,9 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { case FILE_EXPLORE_ANDROID_BUILD_TEMPLATES: { OS::get_singleton()->shell_open("file://" + ProjectSettings::get_singleton()->get_resource_path().plus_file("android")); } break; + case RUN_RELOAD_CURRENT_PROJECT: { + restart_editor(); + } break; case FILE_QUIT: case RUN_PROJECT_MANAGER: { if (!p_confirmed) { @@ -6288,6 +6291,7 @@ EditorNode::EditorNode() { tool_menu->add_item(TTR("Orphan Resource Explorer..."), TOOLS_ORPHAN_RESOURCES); p->add_separator(); + p->add_item(TTR("Reload Current Project"), RUN_RELOAD_CURRENT_PROJECT); #ifdef OSX_ENABLED p->add_shortcut(ED_SHORTCUT("editor/quit_to_project_list", TTR("Quit to Project List"), KEY_MASK_SHIFT + KEY_MASK_ALT + KEY_Q), RUN_PROJECT_MANAGER, true); #else diff --git a/editor/editor_node.h b/editor/editor_node.h index ce42fd3c8a..037ed263c5 100644 --- a/editor/editor_node.h +++ b/editor/editor_node.h @@ -164,6 +164,7 @@ private: RUN_PLAY_CUSTOM_SCENE, RUN_SETTINGS, RUN_PROJECT_DATA_FOLDER, + RUN_RELOAD_CURRENT_PROJECT, RUN_PROJECT_MANAGER, RUN_VCS_SETTINGS, RUN_VCS_SHUT_DOWN, |