-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Fix EditorInterface.get_selected_paths()
working incorrectly when FileSystemDock is in split mode
#94703
Conversation
Will try and test this tomorrow |
93a8967
to
ada452a
Compare
b44d37a
to
4d79c90
Compare
I wonder if folders that are selected in the tree should also be included when in split mode? Otherwise you can't select multiple folders that are in different places without changing the display mode to tree only. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've confirmed the bug and confirmed that this PR works correctly in both modes (i.e. doesn't regress with the single tree mode selected)
I'd say the expected behavior is that the list of files is returned, but the option of including the folder as well might be considered, though I think we can go with this and see what we might want later as well (we could add a note to the documentation clarifying what exactly is returned, elaborating that it returns just the files selected in split mode)
Approving on that this works and the code looks good, might be a more elegant solution but I'm not familiar with the code here so can't speak to that
In split mode if you have a folder selected, but none of the files, the returned list is empty. If no file is selected, maybe the selected directory should be returned at least? |
…ileSystemDock is in split mode
4d79c90
to
b55e97c
Compare
@KoBeWi I updated the PR, I hope this is what you meant. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like it's possible to multi-select in tree in split view, so maybe all selected directories should be returned 🤔
But this way it's fine too.
It's also possible to deselect everything with ctrl, this is why I chose to return ony the current directory. |
Thanks! And congrats for your first merged Godot contribution 🎉 |
Cherry-picked for 4.3.1. |
Fixes #88228