Focus shader text editor when opened with quick open dialog#102193
Focus shader text editor when opened with quick open dialog#102193Repiteo merged 1 commit intogodotengine:masterfrom
Conversation
|
I approve, this matches the behavior of the script editor. |
|
I wondered how I could make this changed merged. Shall I add it to the next call agenda ? |
|
@MartinDelille |
paddy-exe
left a comment
There was a problem hiding this comment.
Tested and works as expected. Since this is a new feature, this will have to wait until 4.5.
Not sure if there are any style nitpicks applicable here.
|
Thank you for the feedback @paddy-exe ! |
9f4cfb1 to
2a04155
Compare
kitbdev
left a comment
There was a problem hiding this comment.
This PR currently only works for shaders that are already open (even if not switched to). If the shader hasn't been opened yet it won't get focused. It also doesn't work with ShaderIncludes.
Hovever, doing it for shaders that are closed (ideally in _switch_to_editor), would probably cause issues since it would take focus from the ScriptEditor when the editor is loaded. I'm not sure if that is easily solvable, so it's fine if we want to keep the current approach for now.
2a04155 to
a4220e9
Compare
|
I moved the focus grab to |
You need to squash the commits, if it's ready - see https://contributing.godotengine.org/en/latest/organization/pull_requests/creating_pull_requests.html#modifying-a-pull-request |
abb5708 to
e761c71
Compare
|
Done: e761c71 |
|
Has I said there is a little side effect: when reponing a project with opened shader, the shader editor will be focused. I think this is can be acceptable. If not I would appreciate a hint to optionally do the focus at startup. I think I would need to add the |
e761c71 to
9e190d1
Compare
|
I fixed the shader editor focus on startup using the |
|
Thanks! Congratulations on your first merged contribution! 🎉 |
|
I'm so proud! Thank a lot for reviewing! ❤️ |
This is my first PR to the project so don't hesitate to ask me for improvements or any kind of modification.
I was a little bit annoyed that opening a shader with the Quick open dialog didn't focus it in the editor, so I added a line to focus the editor when opening a shader.
I'm not sure all the case are handled so feel free to comment on that.