diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-01-25 00:30:14 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-01-25 00:30:14 -0300 |
commit | 31a4762feab58d1eb68d02c9591a80662d383361 (patch) | |
tree | 4c35565630c62e46bc68036846bcaa2d5cd522af | |
parent | 16b8b97472752bdf4753ef4a9bee9b7a687fa1cd (diff) | |
parent | a3e491435593f75e394b8ec72c192d3119bf72d0 (diff) |
Merge pull request #3435 from neikeq/output_focus_steal
Fix Output panel annoying focus steal
-rw-r--r-- | tools/editor/editor_node.cpp | 10 | ||||
-rw-r--r-- | tools/editor/editor_node.h | 1 | ||||
-rw-r--r-- | tools/editor/script_editor_debugger.cpp | 4 |
3 files changed, 14 insertions, 1 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 9fe76a738a..79f5e66401 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -4592,6 +4592,16 @@ ToolButton *EditorNode::add_bottom_panel_item(String p_text,Control *p_item) { } +bool EditorNode::are_bottom_panels_hidden() const { + + for(int i=0;i<bottom_panel_items.size();i++) { + if (bottom_panel_items[i].button->is_pressed()) + return false; + } + + return true; +} + void EditorNode::hide_bottom_panel() { _bottom_panel_switch(false,0); diff --git a/tools/editor/editor_node.h b/tools/editor/editor_node.h index 4dc942c023..c687643d30 100644 --- a/tools/editor/editor_node.h +++ b/tools/editor/editor_node.h @@ -670,6 +670,7 @@ public: ToolButton* add_bottom_panel_item(String p_text,Control *p_item); + bool are_bottom_panels_hidden() const; void make_bottom_panel_item_visible(Control *p_item); void raise_bottom_panel_item(Control *p_item); void hide_bottom_panel(); diff --git a/tools/editor/script_editor_debugger.cpp b/tools/editor/script_editor_debugger.cpp index e727668c49..773f4c7eea 100644 --- a/tools/editor/script_editor_debugger.cpp +++ b/tools/editor/script_editor_debugger.cpp @@ -360,7 +360,9 @@ void ScriptEditorDebugger::_parse_message(const String& p_msg,const Array& p_dat if (EditorNode::get_log()->is_hidden()) { log_forced_visible=true; - EditorNode::get_singleton()->make_bottom_panel_item_visible(EditorNode::get_log()); + if (EditorNode::get_singleton()->are_bottom_panels_hidden()) { + EditorNode::get_singleton()->make_bottom_panel_item_visible(EditorNode::get_log()); + } } EditorNode::get_log()->add_message(t); |