-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Extract EditorMainScreen from EditorNode #96389
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
57df8fd
to
ccc04d3
Compare
Fixed crash, it was because I used Only plugins with a main screen are now added as children to the main screen control, otherwise they use gui_base. |
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.
Looks fine.
I noticed some potential improvements that could be done in a follow-up, e.g. merging buttons
and editor_table
by using a struct.
ccc04d3
to
5e1c9d6
Compare
Thanks! |
Extracts all functionality related to the main screen from EditorNode.
Behavior should not change.
Details
In
_get_main_scene_state()
, removed themain_tab
key. I don't think it has been used since 081a236.In
_set_main_scene_state()
, removed theeditor_index
key check. Only used between 334a818 and #11075 (less than a month during 3.0 dev).The state in only actually saved and used in
_save_central_editor_layout_to_config()
and_load_central_editor_layout_from_config()
._get/set_main_scene_state()
is just used for switching between 2D/3D when opening a scene or changing selection to match the node.Removed
distraction_free->move_to_front();
fromEditorNode::add_editor_plugin
since it isn't needed. The distraction free button is already after everything else in the SceneTabs, and if it was needed it should be somewhere else.set_visible_editor()
andeditor_select()
did the same thing. They are nowEditorMainScreen::select()
.Renamed
editor_plugin_screen
->selected_plugin
, and removed some othereditor_main
prefixes.The
scene_root_parent
is now theeditor_main_screen
. It is not actually the parent of the scene root, and this way I don't need to add a new control to hold the vbox.I could make the
editor_main_screen
actually be the vbox instead of being parent to it, and thescene_root_parent
can be calledmain_screen_parent
, if that is better.Also removed unused forward declarations in EditorNode.