summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorWaldson PatrĂ­cio <waldsonpatricio@gmail.com>2017-12-04 16:48:46 -0300
committerWaldson PatrĂ­cio <waldsonpatricio@gmail.com>2017-12-04 16:48:46 -0300
commit606401331abb2d22bd3f238110ec2b1fef9e0df9 (patch)
treee17258f405318f1e92f4d44d65e9bcf8df301cce /editor
parent2cdfef562e3535c359a73e6baac88ce7c6dd3358 (diff)
Fix stop button always enabled (issue #13933)
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_node.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 3513126a9b..3bd10b88c4 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -1614,7 +1614,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;
@@ -1746,6 +1745,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;
}
@@ -2199,6 +2199,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) {
@@ -5128,6 +5130,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);