Skip to content

Commit eabeafd

Browse files
authored
Merge pull request #95086 from m4gr3d/fix_import_button_not_showing_directories
[Android editor] Fix issue with importing projects
2 parents 3158bbd + fb42b9c commit eabeafd

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

editor/project_manager/project_dialog.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,15 +351,19 @@ void ProjectDialog::_install_path_changed() {
351351
}
352352

353353
void ProjectDialog::_browse_project_path() {
354+
String path = project_path->get_text();
355+
if (path.is_empty()) {
356+
path = EDITOR_GET("filesystem/directories/default_project_path");
357+
}
354358
if (mode == MODE_IMPORT && install_path->is_visible_in_tree()) {
355359
// Select last ZIP file.
356-
fdialog_project->set_current_path(project_path->get_text());
360+
fdialog_project->set_current_path(path);
357361
} else if ((mode == MODE_NEW || mode == MODE_INSTALL) && create_dir->is_pressed()) {
358362
// Select parent directory of project path.
359-
fdialog_project->set_current_dir(project_path->get_text().get_base_dir());
363+
fdialog_project->set_current_dir(path.get_base_dir());
360364
} else {
361365
// Select project path.
362-
fdialog_project->set_current_dir(project_path->get_text());
366+
fdialog_project->set_current_dir(path);
363367
}
364368

365369
if (mode == MODE_IMPORT) {

0 commit comments

Comments
 (0)