Remove show_scene_tree_root_selection from EditorSettings

This commit is contained in:
Robert Yevdokimov 2026-03-01 19:07:47 -05:00
parent fbb918b699
commit 6b9d7fe6de
4 changed files with 20 additions and 24 deletions

View file

@ -1088,9 +1088,6 @@
<member name="interface/editors/derive_script_globals_by_name" type="bool" setter="" getter="">
If [code]true[/code], when extending a script, the global class name of the script is inserted in the script creation dialog, if it exists. If [code]false[/code], the script's file path is always inserted.
</member>
<member name="interface/editors/show_scene_tree_root_selection" type="bool" setter="" getter="">
If [code]true[/code], the Scene dock will display buttons to quickly add a root node to a newly created scene.
</member>
<member name="interface/inspector/auto_unfold_foreign_scenes" type="bool" setter="" getter="">
If [code]true[/code], automatically unfolds Inspector property groups containing modified values when opening a scene for the first time. Only affects scenes without saved folding preferences and only unfolds groups with properties that have been changed from their default values.
[b]Note:[/b] This setting only works in specific scenarios: when opening a scene brought in from another project, or when opening a new scene that already has modified properties (e.g., from version control). Duplicated scenes are not considered foreign, so this setting will not affect them.

View file

@ -1749,6 +1749,7 @@ void SceneTreeDock::_notification(int p_what) {
button_clipboard->connect(SceneStringName(pressed), callable_mp(this, &SceneTreeDock::_tool_selected).bind(TOOL_PASTE, false));
_update_create_root_dialog(true);
_update_create_root_dialog_visibility();
} break;
case NOTIFICATION_ENTER_TREE: {
@ -1803,22 +1804,6 @@ void SceneTreeDock::_notification(int p_what) {
menu_subresources->add_theme_constant_override("icon_max_width", get_theme_constant(SNAME("class_icon_size"), EditorStringName(Editor)));
} break;
case NOTIFICATION_PROCESS: {
bool show_create_root = bool(EDITOR_GET("interface/editors/show_scene_tree_root_selection")) && get_tree()->get_edited_scene_root() == nullptr;
if (show_create_root != create_root_dialog->is_visible_in_tree() && !remote_tree->is_visible()) {
if (show_create_root) {
main_mc->set_theme_type_variation("");
create_root_dialog->show();
scene_tree->hide();
} else {
main_mc->set_theme_type_variation("NoBorderHorizontalBottom");
create_root_dialog->hide();
scene_tree->show();
}
}
} break;
case NOTIFICATION_DRAG_END: {
_reset_hovering_timer();
if (tree_item_inspected) {
@ -3430,6 +3415,7 @@ bool SceneTreeDock::_check_node_recursive(Variant &r_variant, Node *p_node, Node
void SceneTreeDock::set_edited_scene(Node *p_scene) {
edited_scene = p_scene;
_update_create_root_dialog_visibility();
}
static bool _is_same_selection(const Vector<Node *> &p_first, const HashMap<ObjectID, Object *> &p_second) {
@ -4640,16 +4626,29 @@ void SceneTreeDock::_remote_tree_selected() {
}
void SceneTreeDock::_local_tree_selected() {
if (!bool(EDITOR_GET("interface/editors/show_scene_tree_root_selection")) || get_tree()->get_edited_scene_root() != nullptr) {
scene_tree->show();
}
if (remote_tree) {
remote_tree->hide();
}
_update_create_root_dialog_visibility();
edit_remote->set_pressed(false);
edit_local->set_pressed(true);
}
void SceneTreeDock::_update_create_root_dialog_visibility() {
if (remote_tree && remote_tree->is_visible()) {
return;
}
if (edited_scene == nullptr) {
main_mc->set_theme_type_variation("");
create_root_dialog->show();
scene_tree->hide();
} else {
main_mc->set_theme_type_variation("NoBorderHorizontalBottom");
create_root_dialog->hide();
scene_tree->show();
}
}
void SceneTreeDock::_update_create_root_dialog(bool p_initializing) {
if (!p_initializing) {
EditorSettings::get_singleton()->set_setting("_use_favorites_root_selection", node_shortcuts_toggle->is_pressed());
@ -5164,7 +5163,6 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
add_child(clear_inherit_confirm);
set_process_input(true);
set_process(true);
EDITOR_DEF("_use_favorites_root_selection", false);

View file

@ -284,6 +284,7 @@ class SceneTreeDock : public EditorDock {
void _local_tree_selected();
void _update_create_root_dialog(bool p_initializing = false);
void _update_create_root_dialog_visibility();
void _favorite_root_selected(const String &p_class);
void _feature_profile_changed();

View file

@ -562,7 +562,6 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
#endif
EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/editor/appearance/collapse_main_menu", is_android_editor, "")
_initial_set("interface/editors/show_scene_tree_root_selection", true);
_initial_set("interface/editors/derive_script_globals_by_name", true);
_initial_set("docks/scene_tree/ask_before_revoking_unique_name", true);
@ -1255,6 +1254,7 @@ void EditorSettings::_handle_setting_compatibility() {
erase("run/output/always_open_output_on_play");
erase("run/output/always_close_output_on_stop");
erase("text_editor/theme/line_spacing"); // See GH-106137.
erase("interface/editors/show_scene_tree_root_selection");
// Handle renamed settings.
_rename_setting("interface/editor/editor_language", "interface/editor/localization/editor_language");