Преглед изворни кода

Rename `SCENE_SET_MAIN_SCENE` to `SCENE_TAB_SET_AS_MAIN_SCENE`

vaner-org пре 1 месец
родитељ
комит
6a5c7de993
3 измењених фајлова са 4 додато и 4 уклоњено
  1. 2 2
      editor/editor_node.cpp
  2. 1 1
      editor/editor_node.h
  3. 1 1
      editor/scene/editor_scene_tabs.cpp

+ 2 - 2
editor/editor_node.cpp

@@ -2614,7 +2614,7 @@ void EditorNode::_dialog_action(String p_file) {
 
 
 		case SAVE_AND_SET_MAIN_SCENE: {
 		case SAVE_AND_SET_MAIN_SCENE: {
 			_save_scene(p_file);
 			_save_scene(p_file);
-			_menu_option_confirm(SCENE_SET_MAIN_SCENE, true);
+			_menu_option_confirm(SCENE_TAB_SET_AS_MAIN_SCENE, true);
 		} break;
 		} break;
 
 
 		case FILE_EXPORT_MESH_LIBRARY: {
 		case FILE_EXPORT_MESH_LIBRARY: {
@@ -3349,7 +3349,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
 
 
 		} break;
 		} break;
 
 
-		case SCENE_SET_MAIN_SCENE: {
+		case SCENE_TAB_SET_AS_MAIN_SCENE: {
 			const String scene_path = editor_data.get_scene_path(editor_data.get_edited_scene());
 			const String scene_path = editor_data.get_scene_path(editor_data.get_edited_scene());
 			if (scene_path.is_empty()) {
 			if (scene_path.is_empty()) {
 				current_menu_option = SAVE_AND_SET_MAIN_SCENE;
 				current_menu_option = SAVE_AND_SET_MAIN_SCENE;

+ 1 - 1
editor/editor_node.h

@@ -148,7 +148,6 @@ public:
 		SCENE_SAVE_SCENE,
 		SCENE_SAVE_SCENE,
 		SCENE_SAVE_AS_SCENE,
 		SCENE_SAVE_AS_SCENE,
 		SCENE_SAVE_ALL_SCENES,
 		SCENE_SAVE_ALL_SCENES,
-		SCENE_SET_MAIN_SCENE,
 		SCENE_MULTI_SAVE_AS_SCENE,
 		SCENE_MULTI_SAVE_AS_SCENE,
 		SCENE_QUICK_OPEN,
 		SCENE_QUICK_OPEN,
 		SCENE_QUICK_OPEN_SCENE,
 		SCENE_QUICK_OPEN_SCENE,
@@ -215,6 +214,7 @@ public:
 
 
 		// Non-menu options.
 		// Non-menu options.
 		SCENE_TAB_CLOSE,
 		SCENE_TAB_CLOSE,
+		SCENE_TAB_SET_AS_MAIN_SCENE,
 		SAVE_AND_RUN,
 		SAVE_AND_RUN,
 		SAVE_AND_RUN_MAIN_SCENE,
 		SAVE_AND_RUN_MAIN_SCENE,
 		SAVE_AND_SET_MAIN_SCENE,
 		SAVE_AND_SET_MAIN_SCENE,

+ 1 - 1
editor/scene/editor_scene_tabs.cpp

@@ -204,7 +204,7 @@ void EditorSceneTabs::_update_context_menu() {
 		DISABLE_LAST_OPTION_IF(!ResourceLoader::exists(scene_path));
 		DISABLE_LAST_OPTION_IF(!ResourceLoader::exists(scene_path));
 		scene_tabs_context_menu->add_item(TTR("Play This Scene"), SCENE_RUN);
 		scene_tabs_context_menu->add_item(TTR("Play This Scene"), SCENE_RUN);
 		DISABLE_LAST_OPTION_IF(no_root_node);
 		DISABLE_LAST_OPTION_IF(no_root_node);
-		scene_tabs_context_menu->add_item(TTR("Set as Main Scene"), EditorNode::SCENE_SET_MAIN_SCENE);
+		scene_tabs_context_menu->add_item(TTR("Set as Main Scene"), EditorNode::SCENE_TAB_SET_AS_MAIN_SCENE);
 		DISABLE_LAST_OPTION_IF(no_root_node || (!main_scene_path.is_empty() && ResourceUID::ensure_path(main_scene_path) == scene_path));
 		DISABLE_LAST_OPTION_IF(no_root_node || (!main_scene_path.is_empty() && ResourceUID::ensure_path(main_scene_path) == scene_path));
 
 
 		scene_tabs_context_menu->add_separator();
 		scene_tabs_context_menu->add_separator();