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

[Text Editor] Clicking on script of a node should also select that node #47580

Open
wyattbiker opened this issue Apr 2, 2021 · 5 comments
Open

Comments

@wyattbiker
Copy link

Godot version:
Godot Engine v3.2.3.stable.official - https://godotengine.org
OpenGL ES 3.0 Renderer: NVIDIA GeForce GT 650M OpenGL Engine

Godot Engine v3.3.rc7.official - https://godotengine.org
OpenGL ES 3.0 Renderer: NVIDIA GeForce GT 650M OpenGL Engine
OpenGL ES Batching: ON

Mac OS X Catalina

Issue description:
When clicking on a node's script icon, the script opens up in the editor, but the selection remains on the previous node. This causes confusion, because one looking at a script would not node which node it's attached to.

Steps to reproduce:
Open up a project and select to open a script for any node. Then click on a script icon for a different node.
2021-04-02 14-40-39 2021-04-02 14_42_37

Also as of note, if you click on a node's signals icon (if signals have been created of course), the node itself is selected properly. We need to have this consistent for script selection as well.

@wyattbiker
Copy link
Author

wyattbiker commented Apr 2, 2021

When you are switching between Scene tabs, and come back the text editor may not show the code you were working on, forcing you to go back and remember which node you were on and open that code. Notice below how when I click on the CollisionShape object script icon and then switch to Main scene and back to PlayerBullet, the script that shows up is for PlayerBullet object. Annoying because now I have to go click back on CollisionObject.

2021-04-02 15-34-55 2021-04-02 15_36_41

@Calinou
Copy link
Member

Calinou commented Apr 2, 2021

There is no 1:1 mapping between scripts and nodes. One script can be attached to several nodes, or none in the currently open scene.

@wyattbiker
Copy link
Author

wyattbiker commented Apr 2, 2021

Understood but when you click on the script icon of a node, the node should be highlighted. In addition, when switching between scenes, and coming back, the script in the former scene, should still be what you were working on.

@Xrayez
Copy link
Contributor

Xrayez commented Apr 2, 2021

When you are switching between Scene tabs, and come back the text editor may not show the code you were working on, forcing you to go back and remember which node you were on and open that code.

There's text_editor/files/open_dominant_script_on_scene_change in the editor settings which may help you.

@wyattbiker
Copy link
Author

I unchecked it and that just disables loading the currently open scene script.

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

3 participants