-
-
Notifications
You must be signed in to change notification settings - Fork 23.5k
Improve editor 2D/3D main screen auto-switching logic #104010
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
Improve editor 2D/3D main screen auto-switching logic #104010
Conversation
|
@kitbdev You may be interested in reviewing this, since you've worked on the EditorMainScreen class before. |
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 actually started a review but forgot to finish it, thanks for reminding me.
I don't think moving buttons around is properly supported, but I don't see a problem with the changes supporting it. The next and previous shortcuts don't use button order for example.
The other switching logic changes make sense too.
Also you can mention in the OP that this fixes godotengine/godot-proposals#12154
aff433e to
acd050b
Compare
acd050b to
c13d4e7
Compare
19a3e9f to
db6a212
Compare
Co-authored-by: Kit Bishop <kitbdev@gmail.com>
db6a212 to
d9e1f5d
Compare
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.
Tested locally, it works as expected. Code looks good to me.
|
Thanks! |
In master, Godot has a feature where the main screen tabs may auto-switch depending on the node type being edited.
Seems simple enough. However, the code currently has the following problems:
func _handleson each plugin, there is hard-coded logic to check for CanvasItem and Node3D.main_screen_switch_current_master.mp4
This PR makes the following changes:
bool EditorMainScreen::can_auto_switch_screens() const.func _handles.can_take_away_focusandcan_lose_focus_on_node_selectionfunctions.This now works correctly for custom node types and main screen tabs placed to the left of Script:
main_screen_switch_with_pr.mp4
Implements and closes godotengine/godot-proposals#12154