diff --git a/editor/editor_name_dialog.cpp b/editor/editor_name_dialog.cpp index e4ee6b171c6..2e24af10294 100644 --- a/editor/editor_name_dialog.cpp +++ b/editor/editor_name_dialog.cpp @@ -80,11 +80,12 @@ void EditorNameDialog::_bind_methods() { EditorNameDialog::EditorNameDialog() { makevb = memnew(VBoxContainer); + makevb->set_margin(MARGIN_TOP, 5); + makevb->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_BEGIN, 5); + makevb->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, 5); add_child(makevb); + name = memnew(LineEdit); makevb->add_child(name); - name->set_margin(MARGIN_TOP, 5); - name->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_BEGIN, 5); - name->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, 5); name->connect("input_event", this, "_line_input_event"); }