Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Fix Find in Files shader editor focus

kitcedb4ad7e21e
diff --git a/editor/script/script_editor_plugin.cpp b/editor/script/script_editor_plugin.cpp
index c0c925e7bf6..a9e275164ad 100644
--- a/editor/script/script_editor_plugin.cpp
+++ b/editor/script/script_editor_plugin.cpp
@@ -3956,7 +3956,7 @@ void ScriptEditor::_on_find_in_files_result_selected(const String &fpath, int li
if (fpath.has_extension("gdshader") || fpath.has_extension("gdshaderinc")) {
ShaderEditorPlugin *shader_editor = Object::cast_to<ShaderEditorPlugin>(EditorNode::get_editor_data().get_editor_by_name("Shader"));
shader_editor->edit(res.ptr());
- shader_editor->make_visible(true);
+ shader_editor->set_current();
if (ShaderTextEditor *shader_te = Object::cast_to<ShaderTextEditor>(ScriptEditor::get_bottom_script_editor()->get_resource_editor(res))) {
shader_te->goto_line_selection(line_number - 1, begin, end);
}