浏览代码

Merge pull request #3278 from neikeq/issue_305

Close scene menu option asks for confirmation only if there are unsaved changes
Rémi Verschelde 9 年之前
父节点
当前提交
405cfb6da2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tools/editor/editor_node.cpp

+ 1 - 1
tools/editor/editor_node.cpp

@@ -2108,7 +2108,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
 		} break;
 		case FILE_CLOSE: {
 
-			if (!p_confirmed) {
+			if (!p_confirmed && unsaved_cache) {
 				confirmation->get_ok()->set_text("Yes");
 				//confirmation->get_cancel()->show();
 				confirmation->set_text("Close scene? (Unsaved changes will be lost)");