-
-
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
Added Rename Context Menu Option for SceneTreeDock #18786
Added Rename Context Menu Option for SceneTreeDock #18786
Conversation
} | ||
menu->add_icon_shortcut(get_icon("Rename", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/batch_rename"), TOOL_BATCH_RENAME); |
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.
It should probably be moved to an else
, otherwise we'll get two "Rename" options for single selections.
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.
Or is Batch Rename useful for single selections too?
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.
Hey I commented down below, but to elaborate (sorry, not used to Github code review)
On batch rename, I'm not entirely sure there's any point to use it on a single node since I'm not the author of that functionality. I merely kept it outside of an else as that's how it was when I looked at the code.
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 had a look and Batch Rename is not useful for a single node, so you can put it in an else
branch IMO.
Unrelated to this PR, but note that the email you use to sign your commits (see header of https://github.com/godotengine/godot/commit/71211e7e2222f43b66138b68d794a3063e254a4a.patch ) is not linked to your GitHub account, so your commits don't appear as authored by "@THEYOKAI". It's not an issue per se, but if you want to fix it, you can add this email as secondary email in your GitHub profile. |
Thanks @akien-mga, I'll fix that email issue. I use a different email for github and other git sites so I just need to manage that better. Also, on batch rename, I'm not entirely sure there's any point to use it on a single node since I'm not the author of that functionality. I merely kept it outside of an else as that's how it was when I looked at the code. |
Merged manually as 1378ca1 with the |
This is OK, but usability is terrible, an action not commonly accessed that should only appear when more than one node is selected should not be on top of the popup. I just changed this on my local branch so it appears more towards the bottom and only when needed. |
@reduz It's no longer on top of the popup since this PR was merged, so it's better if you don't change it and pull --rebase the master branch instead ;) |
@atari-8bit pointed this issue out in the issue tracker ( #18560 ) and I agree that it is strange to not provide rename functionality in the context menu. This pull request adds that feature and also changes the organization or right click elements. I believe that Batch Rename (while useful + cool!) won't be used so much that it warrants being a top-level element in the context menu. I've moved all rename tools near the reload tool.
Rename should work when a single element is selected.
Bugsquad edit: Fixes #18560.