Skip to content

Commit 33fe10c

Browse files
authored
Merge pull request godotengine#95245 from KoBeWi/regression_flood
Initialize project name when importing project
2 parents 1e8bfdc + 9a8ba93 commit 33fe10c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

editor/project_manager/project_dialog.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,10 @@ void ProjectDialog::_install_path_selected(const String &p_path) {
429429
get_ok_button()->grab_focus();
430430
}
431431

432+
void ProjectDialog::_reset_name() {
433+
project_name->set_text(TTR("New Game Project"));
434+
}
435+
432436
void ProjectDialog::_renderer_selected() {
433437
ERR_FAIL_NULL(renderer_button_group->get_pressed_button());
434438

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

696700
void ProjectDialog::ask_for_path_and_show() {
701+
_reset_name();
697702
_browse_project_path();
698703
}
699704

@@ -718,8 +723,7 @@ void ProjectDialog::show_dialog(bool p_reset_name) {
718723
callable_mp(project_name, &LineEdit::select_all).call_deferred();
719724
} else {
720725
if (p_reset_name) {
721-
String proj = TTR("New Game Project");
722-
project_name->set_text(proj);
726+
_reset_name();
723727
}
724728
project_path->set_editable(true);
725729

editor/project_manager/project_dialog.h

+1
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ class ProjectDialog : public ConfirmationDialog {
122122
void _project_path_selected(const String &p_path);
123123
void _install_path_selected(const String &p_path);
124124

125+
void _reset_name();
125126
void _renderer_selected();
126127
void _nonempty_confirmation_ok_pressed();
127128

0 commit comments

Comments
 (0)