From 43b292de1e19eab6d5d6cf6c1aff438767f1c5f7 Mon Sep 17 00:00:00 2001 From: Ignacio Etcheverry Date: Fri, 8 Jan 2016 16:53:47 +0100 Subject: [PATCH] Scene->Close scene: ask confirmation only when unsaved changes --- tools/editor/editor_node.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 9fe0409c0ea..f180a26e7b3 100644 --- a/tools/editor/editor_node.cpp +++ b/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)");