Skip to content
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

Fix ScriptCreateDialog not accepting on submit #82328

Merged
merged 1 commit into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions editor/script_create_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -526,12 +526,6 @@ void ScriptCreateDialog::_path_changed(const String &p_path) {
validation_panel->update();
}

void ScriptCreateDialog::_path_submitted(const String &p_path) {
if (!get_ok_button()->is_disabled()) {
ok_pressed();
}
}

void ScriptCreateDialog::_update_template_menu() {
bool is_language_using_templates = language->is_using_templates();
template_menu->set_disabled(false);
Expand Down Expand Up @@ -960,6 +954,7 @@ ScriptCreateDialog::ScriptCreateDialog() {
file_path->connect("text_changed", callable_mp(this, &ScriptCreateDialog::_path_changed));
file_path->set_h_size_flags(Control::SIZE_EXPAND_FILL);
hb->add_child(file_path);
register_text_enter(file_path);
path_button = memnew(Button);
path_button->connect("pressed", callable_mp(this, &ScriptCreateDialog::_browse_path).bind(false, true));
hb->add_child(path_button);
Expand All @@ -973,7 +968,7 @@ ScriptCreateDialog::ScriptCreateDialog() {

built_in_name = memnew(LineEdit);
built_in_name->set_h_size_flags(Control::SIZE_EXPAND_FILL);
built_in_name->connect("text_submitted", callable_mp(this, &ScriptCreateDialog::_path_submitted));
register_text_enter(built_in_name);
label = memnew(Label(TTR("Name:")));
gc->add_child(label);
gc->add_child(built_in_name);
Expand Down
1 change: 0 additions & 1 deletion editor/script_create_dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ class ScriptCreateDialog : public ConfirmationDialog {
void _path_hbox_sorted();
bool _can_be_built_in();
void _path_changed(const String &p_path = String());
void _path_submitted(const String &p_path = String());
void _language_changed(int l = 0);
void _built_in_pressed();
void _use_template_pressed();
Expand Down
Loading