فهرست منبع

Scene->Close scene: ask confirmation only when unsaved changes

Ignacio Etcheverry 9 سال پیش
والد
کامیت
43b292de1e
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)");