diff options
-rw-r--r-- | editor/editor_layouts_dialog.cpp | 6 | ||||
-rw-r--r-- | editor/editor_node.cpp | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/editor/editor_layouts_dialog.cpp b/editor/editor_layouts_dialog.cpp index 33d9a410e2..19b137c7fd 100644 --- a/editor/editor_layouts_dialog.cpp +++ b/editor/editor_layouts_dialog.cpp @@ -98,6 +98,11 @@ void EditorLayoutsDialog::_post_popup() { for (const String &E : layouts) { layout_names->add_item(E); } + if (name->is_visible()) { + name->grab_focus(); + } else { + layout_names->grab_focus(); + } } EditorLayoutsDialog::EditorLayoutsDialog() { @@ -109,7 +114,6 @@ EditorLayoutsDialog::EditorLayoutsDialog() { layout_names = memnew(ItemList); layout_names->set_auto_height(true); makevb->add_margin_child(TTR("Select existing layout:"), layout_names); - makevb->add_child(layout_names); layout_names->set_custom_minimum_size(Size2(300 * EDSCALE, 1)); layout_names->set_visible(true); layout_names->set_offset(SIDE_TOP, 5); diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index a70a40c5a1..0c75a36c7d 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -5194,15 +5194,15 @@ void EditorNode::_layout_menu_option(int p_id) { current_menu_option = p_id; layout_dialog->set_title(TTR("Save Layout")); layout_dialog->set_ok_button_text(TTR("Save")); - layout_dialog->popup_centered(); layout_dialog->set_name_line_enabled(true); + layout_dialog->popup_centered(); } break; case SETTINGS_LAYOUT_DELETE: { current_menu_option = p_id; layout_dialog->set_title(TTR("Delete Layout")); layout_dialog->set_ok_button_text(TTR("Delete")); - layout_dialog->popup_centered(); layout_dialog->set_name_line_enabled(false); + layout_dialog->popup_centered(); } break; case SETTINGS_LAYOUT_DEFAULT: { _load_docks_from_config(default_layout, "docks"); |