Skip to content

Commit 9f4cfb1

Browse files
committed
Focus shader text editor when opened with quick open dialog
1 parent ee4acfb commit 9f4cfb1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

editor/plugins/shader_editor_plugin.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ void ShaderEditorPlugin::edit(Object *p_object) {
161161
if (edited_shaders[i].shader.ptr() == s) {
162162
shader_tabs->set_current_tab(i);
163163
shader_list->select(i);
164+
TextShaderEditor *text_shader_editor = Object::cast_to<TextShaderEditor>(edited_shaders[i].shader_editor);
165+
if (text_shader_editor) {
166+
text_shader_editor->get_code_editor()->get_text_editor()->grab_focus();
167+
}
164168
return;
165169
}
166170
}

0 commit comments

Comments
 (0)