Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep the FileSystem dock focused after a file rename operation #11700

Open
sszigeti opened this issue Feb 4, 2025 · 0 comments
Open

Keep the FileSystem dock focused after a file rename operation #11700

sszigeti opened this issue Feb 4, 2025 · 0 comments

Comments

@sszigeti
Copy link

sszigeti commented Feb 4, 2025

Describe the project you are working on

Irrelevant.

Describe the problem or limitation you are having in your project

I had to rename a few dozen resource files in my project, so I used the FileSystem dock.

I have to click the file name with the mouse, then press F2 to start the file rename editor. After making the change and pressing Enter, Godot renames the file, but the focus disappears from the FileSystem dock, so I have to use the mouse again to click the next file I wish to rename.

Instead, if the FileSystem dock kept the focus, I could use the cursor keys to move to the next file.

By the way, the FileSystem "split mode" is not consistent in this regard. I only use it on the default setting (a single window), but when the directory and file lists are separated, moving in the file list via the cursor is not possible anymore.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

The FileSystem should keep the focus, so I could use the cursor keys to move to the next file.

As an edge case, if there's an active filter and as the result of the renaming operation the file is no longer shown, the next file at the same pixel coordinates could get the focus, or, failing that, the closest directory.

Maybe it could be an EditorSettings preference to enable the retention of focus after file renames, maybe as a choice of behaviors:

  • Drop the focus (current behavior)
  • Focus the renamed file
  • Focused line keeps the focus

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

The gist of my request is that when the FileSystem dock is focused, it shouldn't lose the focus as result of a file renaming operation.

If this enhancement will not be used often, can it be worked around with a few lines of script?

I'm not familiar enough with editor modding to answer this.

Is there a reason why this should be core and not an add-on in the asset library?

I'd say this is a generic UX enhancement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants