Skip to content

Commit 9ce8d2d

Browse files
committed
Merge pull request godotengine#112904 from vaner-org/fix-scene-export-as-regression
Fix `Scene > Export As...` being incorrectly disabled
2 parents 3a3af8d + 6a5c7de commit 9ce8d2d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

editor/editor_node.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2640,7 +2640,7 @@ void EditorNode::_dialog_action(String p_file) {
26402640

26412641
case SAVE_AND_SET_MAIN_SCENE: {
26422642
_save_scene(p_file);
2643-
_menu_option_confirm(SCENE_SET_MAIN_SCENE, true);
2643+
_menu_option_confirm(SCENE_TAB_SET_AS_MAIN_SCENE, true);
26442644
} break;
26452645

26462646
case FILE_EXPORT_MESH_LIBRARY: {
@@ -3375,7 +3375,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
33753375

33763376
} break;
33773377

3378-
case SCENE_SET_MAIN_SCENE: {
3378+
case SCENE_TAB_SET_AS_MAIN_SCENE: {
33793379
const String scene_path = editor_data.get_scene_path(editor_data.get_edited_scene());
33803380
if (scene_path.is_empty()) {
33813381
current_menu_option = SAVE_AND_SET_MAIN_SCENE;

editor/editor_node.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ class EditorNode : public Node {
148148
SCENE_SAVE_SCENE,
149149
SCENE_SAVE_AS_SCENE,
150150
SCENE_SAVE_ALL_SCENES,
151-
SCENE_SET_MAIN_SCENE,
152151
SCENE_MULTI_SAVE_AS_SCENE,
153152
SCENE_QUICK_OPEN,
154153
SCENE_QUICK_OPEN_SCENE,
@@ -215,6 +214,7 @@ class EditorNode : public Node {
215214

216215
// Non-menu options.
217216
SCENE_TAB_CLOSE,
217+
SCENE_TAB_SET_AS_MAIN_SCENE,
218218
SAVE_AND_RUN,
219219
SAVE_AND_RUN_MAIN_SCENE,
220220
SAVE_AND_SET_MAIN_SCENE,

editor/scene/editor_scene_tabs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ void EditorSceneTabs::_update_context_menu() {
204204
DISABLE_LAST_OPTION_IF(!ResourceLoader::exists(scene_path));
205205
scene_tabs_context_menu->add_item(TTR("Play This Scene"), SCENE_RUN);
206206
DISABLE_LAST_OPTION_IF(no_root_node);
207-
scene_tabs_context_menu->add_item(TTR("Set as Main Scene"), EditorNode::SCENE_SET_MAIN_SCENE);
207+
scene_tabs_context_menu->add_item(TTR("Set as Main Scene"), EditorNode::SCENE_TAB_SET_AS_MAIN_SCENE);
208208
DISABLE_LAST_OPTION_IF(no_root_node || (!main_scene_path.is_empty() && ResourceUID::ensure_path(main_scene_path) == scene_path));
209209

210210
scene_tabs_context_menu->add_separator();

0 commit comments

Comments
 (0)