@@ -3312,8 +3312,14 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
33123312 p_confirmed = false ;
33133313 }
33143314
3315+ if (p_confirmed && stop_project_confirmation && project_run_bar->is_playing ()) {
3316+ project_run_bar->stop_playing ();
3317+ stop_project_confirmation = false ;
3318+ p_confirmed = false ;
3319+ }
3320+
33153321 if (!p_confirmed) {
3316- if (project_run_bar->is_playing ()) {
3322+ if (!stop_project_confirmation && project_run_bar->is_playing ()) {
33173323 if (p_option == PROJECT_RELOAD_CURRENT_PROJECT) {
33183324 confirmation->set_text (TTR (" Stop running project before reloading the current project?" ));
33193325 confirmation->set_ok_button_text (TTR (" Stop & Reload" ));
@@ -3324,6 +3330,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
33243330 confirmation->reset_size ();
33253331 confirmation->popup_centered ();
33263332 confirmation_button->hide ();
3333+ stop_project_confirmation = true ;
33273334 break ;
33283335 }
33293336
@@ -6209,6 +6216,10 @@ void EditorNode::_cancel_close_scene_tab() {
62096216 }
62106217}
62116218
6219+ void EditorNode::_cancel_confirmation () {
6220+ stop_project_confirmation = false ;
6221+ }
6222+
62126223void EditorNode::_prepare_save_confirmation_popup () {
62136224 if (save_confirmation->get_window () != get_last_exclusive_window ()) {
62146225 save_confirmation->reparent (get_last_exclusive_window ());
@@ -8410,6 +8421,7 @@ EditorNode::EditorNode() {
84108421 confirmation->set_min_size (Vector2 (450.0 * EDSCALE, 0 ));
84118422 confirmation->connect (SceneStringName (confirmed), callable_mp (this , &EditorNode::_menu_confirm_current));
84128423 confirmation->connect (" custom_action" , callable_mp (this , &EditorNode::_discard_changes));
8424+ confirmation->connect (" canceled" , callable_mp (this , &EditorNode::_cancel_confirmation));
84138425
84148426 save_confirmation = memnew (ConfirmationDialog);
84158427 save_confirmation->add_button (TTRC (" Don't Save" ), DisplayServer::get_singleton ()->get_swap_cancel_ok (), " discard" );
0 commit comments