diff options
author | kobewi <kobewi4e@gmail.com> | 2023-04-07 17:44:36 +0200 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-04-07 17:44:36 +0200 |
commit | f8517e1c4b05a0a6e5fbf85884d814145a136244 (patch) | |
tree | cea7be6e436735338c7dbbac2cc91ed6b461ee9e /editor | |
parent | 2c80ded6ce31c7fb02669973c57ad295f60fb507 (diff) |
Remember directory when installing templates file
(cherry picked from commit 551b6965ece72605cbe39f26bd8ea4d0d33bba2f)
Diffstat (limited to 'editor')
-rw-r--r-- | editor/export/export_template_manager.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/export/export_template_manager.cpp b/editor/export/export_template_manager.cpp index 658f797211..725dc1d6bb 100644 --- a/editor/export/export_template_manager.cpp +++ b/editor/export/export_template_manager.cpp @@ -529,6 +529,7 @@ bool ExportTemplateManager::_install_file_selected(const String &p_file, bool p_ unzClose(pkg); _update_template_status(); + EditorSettings::get_singleton()->set_meta("export_template_download_directory", p_file.get_base_dir()); return true; } @@ -992,6 +993,7 @@ ExportTemplateManager::ExportTemplateManager() { install_file_dialog->set_title(TTR("Select Template File")); install_file_dialog->set_access(FileDialog::ACCESS_FILESYSTEM); install_file_dialog->set_file_mode(FileDialog::FILE_MODE_OPEN_FILE); + install_file_dialog->set_current_dir(EditorSettings::get_singleton()->get_meta("export_template_download_directory", "")); install_file_dialog->add_filter("*.tpz", TTR("Godot Export Templates")); install_file_dialog->connect("file_selected", callable_mp(this, &ExportTemplateManager::_install_file_selected).bind(false)); add_child(install_file_dialog); |