Skip to content
Open
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
8 changes: 6 additions & 2 deletions editor/project_manager/project_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,10 @@ void ProjectDialog::ask_for_path_and_show() {
_browse_project_path();
}

void ProjectDialog::show_dialog(bool p_reset_name) {
void ProjectDialog::show_dialog(bool p_reset_name, bool p_is_confirmed) {
if (mode == MODE_IMPORT && !p_is_confirmed) {
return;
}
if (mode == MODE_RENAME) {
// Name and path are set in `ProjectManager::_rename_project`.
project_path->set_editable(false);
Expand Down Expand Up @@ -978,7 +981,8 @@ void ProjectDialog::_notification(int p_what) {
fdialog_project->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
fdialog_project->connect("dir_selected", callable_mp(this, &ProjectDialog::_project_path_selected));
fdialog_project->connect("file_selected", callable_mp(this, &ProjectDialog::_project_path_selected));
fdialog_project->connect("canceled", callable_mp(this, &ProjectDialog::show_dialog).bind(false), CONNECT_DEFERRED);
fdialog_project->connect(SceneStringName(confirmed), callable_mp(this, &ProjectDialog::show_dialog).bind(false, true), CONNECT_DEFERRED);
fdialog_project->connect("canceled", callable_mp(this, &ProjectDialog::show_dialog).bind(false, false), CONNECT_DEFERRED);
callable_mp((Node *)this, &Node::add_sibling).call_deferred(fdialog_project, false);
} break;
}
Expand Down
2 changes: 1 addition & 1 deletion editor/project_manager/project_dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class ProjectDialog : public ConfirmationDialog {
void set_duplicate_can_edit(bool p_duplicate_can_edit);

void ask_for_path_and_show();
void show_dialog(bool p_reset_name = true);
void show_dialog(bool p_reset_name = true, bool p_is_confirmed = true);

ProjectDialog();
};