Skip to content

Commit

Permalink
Fix issue with import projects for the Android editor
Browse files Browse the repository at this point in the history
  • Loading branch information
m4gr3d committed Aug 2, 2024
1 parent 3978628 commit fb42b9c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions editor/project_manager/project_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,15 +351,19 @@ void ProjectDialog::_install_path_changed() {
}

void ProjectDialog::_browse_project_path() {
String path = project_path->get_text();
if (path.is_empty()) {
path = EDITOR_GET("filesystem/directories/default_project_path");
}
if (mode == MODE_IMPORT && install_path->is_visible_in_tree()) {
// Select last ZIP file.
fdialog_project->set_current_path(project_path->get_text());
fdialog_project->set_current_path(path);
} else if ((mode == MODE_NEW || mode == MODE_INSTALL) && create_dir->is_pressed()) {
// Select parent directory of project path.
fdialog_project->set_current_dir(project_path->get_text().get_base_dir());
fdialog_project->set_current_dir(path.get_base_dir());
} else {
// Select project path.
fdialog_project->set_current_dir(project_path->get_text());
fdialog_project->set_current_dir(path);
}

if (mode == MODE_IMPORT) {
Expand Down

0 comments on commit fb42b9c

Please sign in to comment.