1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-03 16:55:53 +00:00

Focus shader text editor when opened with quick open dialog

This commit is contained in:
Martin Delille
2025-01-30 15:04:29 +01:00
parent eb3d6d8cd3
commit 9e190d1bcd
2 changed files with 16 additions and 5 deletions

View File

@@ -98,6 +98,7 @@ class ShaderEditorPlugin : public EditorPlugin {
ShaderCreateDialog *shader_create_dialog = nullptr;
float text_shader_zoom_factor = 1.0f;
bool restoring_layout = false;
Ref<Resource> _get_current_shader();
void _update_shader_list();
@@ -127,7 +128,7 @@ class ShaderEditorPlugin : public EditorPlugin {
void _set_text_shader_zoom_factor(float p_zoom_factor);
void _update_shader_editor_zoom_factor(CodeTextEditor *p_shader_editor) const;
void _switch_to_editor(ShaderEditor *p_editor);
void _switch_to_editor(ShaderEditor *p_editor, bool p_focus = false);
protected:
void _notification(int p_what);