1
0
Fork 0

Merge pull request #14001 from rraallvv/disable_stop_button

Disable stop button if the scene is not running (2.1)
This commit is contained in:
Andreas Haas 2017-12-05 16:33:02 +00:00 committed by GitHub
commit 88ffa04be4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -1604,7 +1604,7 @@ void EditorNode::_edit_current() {
if (main_plugin) {
// special case if use of external editor is true
if (main_plugin->get_name() == "Script" && bool(EditorSettings::get_singleton()->get("external_editor/use_external_editor"))){
if (main_plugin->get_name() == "Script" && bool(EditorSettings::get_singleton()->get("external_editor/use_external_editor"))) {
main_plugin->edit(current_obj);
}
@ -1876,6 +1876,7 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
play_button->set_pressed(true);
play_button->set_icon(gui_base->get_icon("Reload", "EditorIcons"));
}
stop_button->set_disabled(false);
_playing_edited = p_current;
}
@ -2571,6 +2572,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
play_scene_button->set_icon(gui_base->get_icon("PlayScene", "EditorIcons"));
play_custom_scene_button->set_pressed(false);
play_custom_scene_button->set_icon(gui_base->get_icon("PlayCustom", "EditorIcons"));
stop_button->set_disabled(true);
//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++) {
@ -5596,6 +5598,7 @@ EditorNode::EditorNode() {
stop_button->set_icon(gui_base->get_icon("MainStop", "EditorIcons"));
stop_button->connect("pressed", this, "_menu_option", make_binds(RUN_STOP));
stop_button->set_tooltip(TTR("Stop the scene."));
stop_button->set_disabled(true);
stop_button->set_shortcut(ED_SHORTCUT("editor/stop", TTR("Stop"), KEY_F8));
run_native = memnew(EditorRunNative);