Made "Show Node in Tree" button more user friendly #83761
+23
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is just building on the great PR #75274. The goal was to improve useability, mostly for the "Show Node in Tree" button.
The changes fix the following issues:
I acknowledge that the changes may be a little hacky or wrong. I’ve never done this before. Though I mostly just copied code from around the source to avoid making obvious mistakes, so they should be fewer.
I initially intended to make some suggestions on the original PR, but it was merged faster than I expected, so I missed my opportunity.
Here is how it looks in action:
no big glob of multiselect
https://github.com/godotengine/godot/assets/92269209/76618fb1-bc18-4156-bbea-b634f6b4ba27
right clicking works
https://github.com/godotengine/godot/assets/92269209/374e3287-6eea-407a-b81a-e5d7daac4abe
dragging works instantly because of not using multiselect
https://github.com/godotengine/godot/assets/92269209/442066bf-e022-48fb-b5c4-93c681dd4771
tab switches if you don't already have SceneTreeDock open
https://github.com/godotengine/godot/assets/92269209/00366491-022e-4bf1-b38a-c2b2352a7c90
This change does affect the way the node looks when shown in tree (it's a lot more subtle now), but I thought it was a worthwhile sacrifice for making dragging easier and not making multiselect globs. I'll remove it if I'm the only one who thinks so.