summaryrefslogtreecommitdiffstats
path: root/editor/project_manager
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2024-08-06 23:59:20 +0200
committerGitHub <noreply@github.com>2024-08-06 23:59:20 +0200
commiteabeafd8c3d3fb346853eb1c590ae54b8aa4cd14 (patch)
treeb8ac11067e1b29a93dee2fbdd3090c3bd746b806 /editor/project_manager
parent3158bbdb6d569b0c10c1dc0c08f087db83cf934d (diff)
parentfb42b9ce65c89307d014291b8a8eef1ed9e53be2 (diff)
downloadredot-engine-eabeafd8c3d3fb346853eb1c590ae54b8aa4cd14.tar.gz
Merge pull request #95086 from m4gr3d/fix_import_button_not_showing_directories
[Android editor] Fix issue with importing projects
Diffstat (limited to 'editor/project_manager')
-rw-r--r--editor/project_manager/project_dialog.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/editor/project_manager/project_dialog.cpp b/editor/project_manager/project_dialog.cpp
index ee2253b294..1ea038ede3 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) {