From e1d18e64816325f852355a6e6d4eb3f8feead714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Tue, 21 Mar 2017 12:47:05 +0100 Subject: [PATCH] Add editor option for automatically closing the output when stopping the game (back-ported from 1bd1af776c111f1efdd9a3b0259d8f916c052ef2) --- editor/editor_node.cpp | 8 ++++++++ editor/editor_settings.cpp | 2 ++ 2 files changed, 10 insertions(+) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index e11778d6178..e46a6c6cb05 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -2546,6 +2546,14 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { play_custom_scene_button->set_pressed(false); play_custom_scene_button->set_icon(gui_base->get_icon("PlayCustom", "EditorIcons")); //pause_button->set_pressed(false); + if (bool(EDITOR_DEF("run/always_close_output_on_stop", false))) { + for (int i = 0; i < bottom_panel_items.size(); i++) { + if (bottom_panel_items[i].control == log) { + _bottom_panel_switch(false, i); + break; + } + } + } emit_signal("stop_pressed"); } break; diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 8c2ba58a458..16b9c8e6f6a 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -641,6 +641,8 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { set("resources/save_compressed_resources", true); set("resources/auto_reload_modified_images", true); + set("run/always_close_output_on_stop", false); + set("import/automatic_reimport_on_sources_changed", true); if (p_extra_config.is_valid()) {