summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-04-26 19:02:32 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-04-26 19:02:32 -0300
commiteeb0fcfb4121d98fb3195bafb8c1ef7f7fd0ff9d (patch)
tree71025bcf457d79ec8dca67704f2f848973f91ef8 /tools
parent79d5b7f2580e5da87d8c962558517d7cc65fdf45 (diff)
fix quit bug on linux when using alt-f4, fixes #1677
Diffstat (limited to 'tools')
-rw-r--r--tools/editor/editor_node.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index f50db40525..5d55fed09b 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();