diff options
author | Fredia Huya-Kouadio <fhuyakou@gmail.com> | 2024-08-02 14:49:25 -0700 |
---|---|---|
committer | Fredia Huya-Kouadio <fhuyakou@gmail.com> | 2024-08-02 14:49:25 -0700 |
commit | fb42b9ce65c89307d014291b8a8eef1ed9e53be2 (patch) | |
tree | 3732438cb90f93c641f92919a62e12c5a95b5da0 /editor/project_manager | |
parent | 3978628c6cc1227250fc6ed45c8d854d24c30c30 (diff) | |
download | redot-engine-fb42b9ce65c89307d014291b8a8eef1ed9e53be2.tar.gz |
Fix issue with import projects for the Android editor
Diffstat (limited to 'editor/project_manager')
-rw-r--r-- | editor/project_manager/project_dialog.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/editor/project_manager/project_dialog.cpp b/editor/project_manager/project_dialog.cpp index 52d86a1a95..5543fef3c2 100644 --- a/editor/project_manager/project_dialog.cpp +++ b/editor/project_manager/project_dialog.cpp @@ -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) { |