-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Stopped canvas/spatial editor from becoming active when clicking a node in the scene tree if script editor is currently active. Can use alt + click to switch editor. #40438
Stopped canvas/spatial editor from becoming active when clicking a node in the scene tree if script editor is currently active. Can use alt + click to switch editor. #40438
Conversation
In the first issue you mention, @KoBeWi talks about a |
@groud Also, currently there is no way to access |
I am not really sure I understand. I might be wrong but I assumed the returned value of this function causes the script editor to loose focus, and that, maybe, it should return false instead of true (so you would have to modify it directly in script_editor_plugin.h). If this is enough to solve the problem, you won't need any cast or exposing something. |
Derp... sorry, I understand now. I didn't properly understand what you meant earlier. Yes, changing the method return to false resolves the issue in a much more simple way. Thanks. |
d8f476f
to
6195e71
Compare
Oh cool. :) Just to mention, it might be worth checking the usage of this function though. Those are all usages I see:
as we can see, the only place where it would return true now is going to be in text_editor.h, but I am not sure it should be kept returning true. If it should be returning false too, the can_lose_focus_on_node_selection function could be removed completely and we could make can_take_away_focus always return false. |
Yeah I did notice that. Also |
…l editor if the script editor is currently active
6195e71
to
3653a7d
Compare
Ok, all done. Clicking node does not switch by default. User can alt + click a node to switch to the canvas item/spatial editor. This will need to be documented. |
I'd remove btw this part of condition |
Superseded by #61162. |
Closes #39539, Closes #14862, Closes #33704
If the script editor is open, clicking on a node in the scene tree no longer switches you to the canvas item or spatial editors. The inspector is updated so you can change properties, or drag and drop the node path onto the script easily.
If you want to switch to the other editor, simply hold down the Alt key.