aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranklin Sobrinho2015-12-04 11:33:25 -0300
committerFranklin Sobrinho2015-12-06 20:11:56 -0300
commit97a3fa3f12f81ff0601cfdd279382f4f662442a5 (patch)
treeb27c1d854c6ceec65e4400e38c5072e173325ef9
parent35fa048af555e1f8411a2034706e9e452ce2f399 (diff)
downloadgodot-97a3fa3f12f81ff0601cfdd279382f4f662442a5.tar.gz
godot-97a3fa3f12f81ff0601cfdd279382f4f662442a5.tar.zst
godot-97a3fa3f12f81ff0601cfdd279382f4f662442a5.zip
Fix shader editor focus when switching tabs
-rw-r--r--tools/editor/plugins/shader_editor_plugin.cpp5
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 a182d5774..848073af3 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();
}