Merge pull request #8099 from RandomShaper/close-output-2.1

Add editor option for automatically closing the output when stopping the game (2.1)
This commit is contained in:
Rémi Verschelde 2017-03-24 22:50:02 +01:00 committed by GitHub
commit 2c95976ef7
2 changed files with 10 additions and 0 deletions

View file

@ -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;