瀏覽代碼

Merge pull request #4149 from Paulb23/save_scene_flicker_issue_4118

Fix for issue #4118
Rémi Verschelde 9 年之前
父節點
當前提交
44ee7c238e
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      tools/editor/editor_node.cpp

+ 6 - 2
tools/editor/editor_node.cpp

@@ -2076,8 +2076,12 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
 			Node *scene = editor_data.get_edited_scene_root();
 			if (scene && scene->get_filename()!="") {
 
-				//_save_scene(scene->get_filename());
-				_save_scene_with_preview(scene->get_filename());
+				// save in background if in the script editor
+				if (_get_current_main_editor() == EDITOR_SCRIPT) {
+					_save_scene(scene->get_filename());
+				} else {
+					_save_scene_with_preview(scene->get_filename());
+				}
 				return;
 			};
 			// fallthrough to save_as