From eeb0fcfb4121d98fb3195bafb8c1ef7f7fd0ff9d Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sun, 26 Apr 2015 19:02:32 -0300 Subject: [PATCH] fix quit bug on linux when using alt-f4, fixes #1677 --- tools/editor/editor_node.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index f50db40525b..5d55fed09bc 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -1560,7 +1560,9 @@ void EditorNode::_cleanup_scene() { void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { - current_option=(MenuOptions)p_option; + //print_line("option "+itos(p_option)+" confirm "+itos(p_confirmed)); + if (!p_confirmed) //this may be a hack.. + current_option=(MenuOptions)p_option; switch( p_option ) { @@ -1931,7 +1933,9 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { case FILE_QUIT: { + if (!p_confirmed) { + confirmation->get_ok()->set_text("Quit"); //confirmation->get_cancel()->show(); confirmation->set_text("Exit the Editor?"); @@ -1939,6 +1943,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { break; } + _menu_option_confirm(RUN_STOP,true); get_tree()->quit();