diff options
author | Andreas Haas <Hinsbart@users.noreply.github.com> | 2017-12-05 07:59:52 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-05 07:59:52 +0000 |
commit | 74969b453597aafd626ff66fd652d2ee5ecd2832 (patch) | |
tree | 54751d404e453a721d692243b42d5c0fe8b2c82b | |
parent | 5938466c848becb269f002191901487135e39ce3 (diff) | |
parent | 606401331abb2d22bd3f238110ec2b1fef9e0df9 (diff) |
Merge pull request #13977 from waldson/fix-stop-scene-always-active
Fix stop button always enabled
-rw-r--r-- | editor/editor_node.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index fbf6c86c35..9e242b4ecd 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -1674,7 +1674,6 @@ void EditorNode::_resource_selected(const RES &p_res, const String &p_property) void EditorNode::_run(bool p_current, const String &p_custom) { if (editor_run.get_status() == EditorRun::STATUS_PLAY) { - play_button->set_pressed(!_playing_edited); play_scene_button->set_pressed(_playing_edited); return; @@ -1806,6 +1805,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; } @@ -2277,6 +2277,8 @@ 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); + 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) { @@ -5264,6 +5266,7 @@ EditorNode::EditorNode() { stop_button->set_icon(gui_base->get_icon("Stop", "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); |