You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
EditorNode: fix scene save over others
This commit is contained in:
@@ -908,7 +908,9 @@ void EditorNode::_save_all_scenes() {
|
||||
for (int i = 0; i < editor_data.get_edited_scene_count(); i++) {
|
||||
Node *scene = editor_data.get_edited_scene_root(i);
|
||||
if (scene && scene->get_filename() != "") {
|
||||
// save in background if in the script editor
|
||||
if (i != editor_data.get_edited_scene())
|
||||
_save_scene(scene->get_filename(), i);
|
||||
else
|
||||
_save_scene_with_preview(scene->get_filename());
|
||||
} // else: ignore new scenes
|
||||
}
|
||||
@@ -983,6 +985,9 @@ void EditorNode::_dialog_action(String p_file) {
|
||||
if (file->get_mode() == EditorFileDialog::MODE_SAVE_FILE) {
|
||||
|
||||
_save_default_environment();
|
||||
if (scene_idx != editor_data.get_edited_scene())
|
||||
_save_scene(p_file, scene_idx);
|
||||
else
|
||||
_save_scene_with_preview(p_file);
|
||||
|
||||
if (scene_idx != -1)
|
||||
@@ -1660,7 +1665,9 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
|
||||
Node *scene = editor_data.get_edited_scene_root(scene_idx);
|
||||
if (scene && scene->get_filename() != "") {
|
||||
|
||||
// save in background if in the script editor
|
||||
if (scene_idx != editor_data.get_edited_scene())
|
||||
_save_scene(scene->get_filename(), scene_idx);
|
||||
else
|
||||
_save_scene_with_preview(scene->get_filename());
|
||||
|
||||
if (scene_idx != -1)
|
||||
|
||||
Reference in New Issue
Block a user