Skip to content

Commit a4220e9

Browse files
committed
Focus shader text editor when opened with quick open dialog
1 parent 07f4c06 commit a4220e9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

editor/shader/shader_editor_plugin.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ void ShaderEditorPlugin::edit(Object *p_object) {
163163
shader_tabs->set_current_tab(i);
164164
shader_list->select(i);
165165
_switch_to_editor(edited_shaders[i].shader_editor);
166+
TextShaderEditor *text_shader_editor = Object::cast_to<TextShaderEditor>(edited_shaders[i].shader_editor);
167+
if (text_shader_editor) {
168+
text_shader_editor->get_code_editor()->get_text_editor()->grab_focus();
169+
}
166170
return;
167171
}
168172
}

0 commit comments

Comments
 (0)