Преглед на файлове

Merge pull request #7740 from magyar123/master

Add editor option for closing the output when stopping the game.
Rémi Verschelde преди 8 години
родител
ревизия
ceac8a780e
променени са 2 файла, в които са добавени 9 реда и са изтрити 0 реда
  1. 8 0
      tools/editor/editor_node.cpp
  2. 1 0
      tools/editor/editor_settings.cpp

+ 8 - 0
tools/editor/editor_node.cpp

@@ -2603,6 +2603,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/output/always_close_output_on_stop", true))) {
+				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;

+ 1 - 0
tools/editor/editor_settings.cpp

@@ -655,6 +655,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
 	set("run/auto_save/save_before_running",true);
 	set("run/output/always_clear_output_on_play",true);
 	set("run/output/always_open_output_on_play",true);
+	set("run/output/always_close_output_on_stop",false);
 	set("filesystem/resources/save_compressed_resources",true);
 	set("filesystem/resources/auto_reload_modified_images",true);