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

Made "Show Node in Tree" button more user friendly #83761

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Xenoparrot
Copy link
Contributor

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:

  • Dragging and reparenting can now be done more seamlessly.
    • This was harder before due to multiselecting the referenced node with the edited node
  • The scene tree dock is now focused if it was not focused when the button is pressed, consistent with pressing the “Show in Filesystem” button on exported resources.
  • Pressing the button on multiple properties no longer creates a big glob of selected nodes in the SceneTreeDock.
  • Right clicking the assign button now pulls up the little menu, consistent with exported resources.

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.

@Chaosus Chaosus added this to the 4.3 milestone Oct 22, 2023
@AThousandShips AThousandShips modified the milestones: 4.3, 4.4 Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants