fix quit bug on linux when using alt-f4, fixes #1677
This commit is contained in:
parent
79d5b7f258
commit
eeb0fcfb41
1 changed files with 6 additions and 1 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue