diff options
-rw-r--r-- | tools/editor/plugins/script_editor_plugin.cpp | 7 | ||||
-rw-r--r-- | tools/editor/script_editor_debugger.cpp | 24 | ||||
-rw-r--r-- | tools/editor/script_editor_debugger.h | 2 |
3 files changed, 20 insertions, 13 deletions
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index 37f4076a0c..c96616b42c 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -605,6 +605,7 @@ void ScriptEditor::_show_debugger(bool p_show) { debug_menu->get_popup()->set_item_checked( debug_menu->get_popup()->get_item_index(DEBUG_SHOW), p_show); + debugger->set_always_visible(p_show); } void ScriptEditor::_script_created(Ref<Script> p_script) { @@ -1338,11 +1339,7 @@ void ScriptEditor::_menu_option(int p_option) { case DEBUG_SHOW: { if (debugger) { bool visible = debug_menu->get_popup()->is_item_checked( debug_menu->get_popup()->get_item_index(DEBUG_SHOW) ); - debug_menu->get_popup()->set_item_checked( debug_menu->get_popup()->get_item_index(DEBUG_SHOW), !visible); - if (visible) - debugger->hide(); - else - debugger->show(); + _show_debugger(!visible); } } break; case HELP_CONTEXTUAL: { diff --git a/tools/editor/script_editor_debugger.cpp b/tools/editor/script_editor_debugger.cpp index 60f2afa2c2..6ca949083a 100644 --- a/tools/editor/script_editor_debugger.cpp +++ b/tools/editor/script_editor_debugger.cpp @@ -570,11 +570,12 @@ void ScriptEditorDebugger::_notification(int p_what) { ppeer->set_stream_peer(connection); - show(); + if (!always_visible) + show(); + dobreak->set_disabled(false); tabs->set_current_tab(0); - emit_signal("show_debugger",true); reason->set_text("Child Process Connected"); reason->set_tooltip("Child Process Connected"); scene_tree->clear(); @@ -736,10 +737,8 @@ void ScriptEditorDebugger::stop(){ le_clear->set_disabled(false); le_set->set_disabled(true); - - hide(); - emit_signal("show_debugger",false); - + if (!always_visible) + hide(); } @@ -768,9 +767,7 @@ void ScriptEditorDebugger::_stack_dump_frame_selected() { void ScriptEditorDebugger::_hide_request() { - hide(); emit_signal("show_debugger",false); - } void ScriptEditorDebugger::_output_clear() { @@ -1160,6 +1157,16 @@ void ScriptEditorDebugger:: _error_stack_selected(int p_idx){ } +void ScriptEditorDebugger::set_always_visible(bool p_visible) { + + always_visible=p_visible; + + if (p_visible) + show(); + else + hide(); +} + void ScriptEditorDebugger::_bind_methods() { @@ -1455,6 +1462,7 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor){ add_child(msgdialog); hide(); + always_visible=false; log_forced_visible=false; p_editor->get_undo_redo()->set_method_notify_callback(_method_changeds,this); diff --git a/tools/editor/script_editor_debugger.h b/tools/editor/script_editor_debugger.h index 6b66a62dd5..23815ca3bb 100644 --- a/tools/editor/script_editor_debugger.h +++ b/tools/editor/script_editor_debugger.h @@ -79,6 +79,7 @@ class ScriptEditorDebugger : public Control { TabContainer *tabs; Label *reason; + bool always_visible; bool log_forced_visible; ScriptEditorDebuggerVariables *variables; @@ -182,6 +183,7 @@ public: void update_live_edit_root(); + void set_always_visible(bool p_visible); virtual Size2 get_minimum_size() const; ScriptEditorDebugger(EditorNode *p_editor=NULL); |