diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2015-12-09 07:48:51 +0100 |
---|---|---|
committer | Rémi Verschelde <remi@verschelde.fr> | 2015-12-09 07:48:51 +0100 |
commit | efbb834936fdc9da9789ad37c9cc61e0b90cda95 (patch) | |
tree | fba4e1a9f0c2e2b36bdcebf631fb5afa068bf35e | |
parent | f86477ce93b0d8b1b2e6a080b137cfa2c9a901f6 (diff) | |
parent | 97a3fa3f12f81ff0601cfdd279382f4f662442a5 (diff) |
Merge pull request #2986 from TheHX/pr-shader-editor
Fix shader editor focus when switching tabs
-rw-r--r-- | tools/editor/plugins/shader_editor_plugin.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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<ShaderTextEditor>(); + + if (shader_editor) + shader_editor->get_text_edit()->grab_focus(); + ensure_select_current(); } |