Skip to content

Commit

Permalink
Merge pull request #95245 from KoBeWi/regression_flood
Browse files Browse the repository at this point in the history
Initialize project name when importing project
  • Loading branch information
akien-mga authored Aug 7, 2024
2 parents 1e8bfdc + 9a8ba93 commit 33fe10c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions editor/project_manager/project_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,10 @@ void ProjectDialog::_install_path_selected(const String &p_path) {
get_ok_button()->grab_focus();
}

void ProjectDialog::_reset_name() {
project_name->set_text(TTR("New Game Project"));
}

void ProjectDialog::_renderer_selected() {
ERR_FAIL_NULL(renderer_button_group->get_pressed_button());

Expand Down Expand Up @@ -694,6 +698,7 @@ void ProjectDialog::set_project_path(const String &p_path) {
}

void ProjectDialog::ask_for_path_and_show() {
_reset_name();
_browse_project_path();
}

Expand All @@ -718,8 +723,7 @@ void ProjectDialog::show_dialog(bool p_reset_name) {
callable_mp(project_name, &LineEdit::select_all).call_deferred();
} else {
if (p_reset_name) {
String proj = TTR("New Game Project");
project_name->set_text(proj);
_reset_name();
}
project_path->set_editable(true);

Expand Down
1 change: 1 addition & 0 deletions editor/project_manager/project_dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ class ProjectDialog : public ConfirmationDialog {
void _project_path_selected(const String &p_path);
void _install_path_selected(const String &p_path);

void _reset_name();
void _renderer_selected();
void _nonempty_confirmation_ok_pressed();

Expand Down

0 comments on commit 33fe10c

Please sign in to comment.