From 97a3fa3f12f81ff0601cfdd279382f4f662442a5 Mon Sep 17 00:00:00 2001 From: Franklin Sobrinho Date: Fri, 4 Dec 2015 11:33:25 -0300 Subject: Fix shader editor focus when switching tabs --- tools/editor/plugins/shader_editor_plugin.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools/editor/plugins') diff --git a/tools/editor/plugins/shader_editor_plugin.cpp b/tools/editor/plugins/shader_editor_plugin.cpp index a182d57742..848073af3e 100644 --- a/tools/editor/plugins/shader_editor_plugin.cpp +++ b/tools/editor/plugins/shader_editor_plugin.cpp @@ -235,6 +235,11 @@ void ShaderEditor::_menu_option(int p_option) { void ShaderEditor::_tab_changed(int p_which) { + ShaderTextEditor *shader_editor = tab_container->get_child(p_which)->cast_to(); + + if (shader_editor) + shader_editor->get_text_edit()->grab_focus(); + ensure_select_current(); } -- cgit v1.2.3