diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-11-02 11:07:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-02 11:07:18 +0100 |
commit | 5beaea989146a7ac6d4e5fa74d084d911622e543 (patch) | |
tree | 958523e367e9c5c039a2fd535101f35b8609087d /editor/project_export.cpp | |
parent | eed56bce14b468555804430bde82ac20adf89e6f (diff) | |
parent | d51999f11d7f6c1b30310a08cde7b12666e673ac (diff) |
Merge pull request #23389 from marcelofg55/multiple_ext
Export for OS X on OS X now lets you select .dmg or .zip
Diffstat (limited to 'editor/project_export.cpp')
-rw-r--r-- | editor/project_export.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/editor/project_export.cpp b/editor/project_export.cpp index d2dccdb425..a297f2d47e 100644 --- a/editor/project_export.cpp +++ b/editor/project_export.cpp @@ -804,13 +804,16 @@ void ProjectExportDialog::_export_project() { export_project->set_access(FileDialog::ACCESS_FILESYSTEM); export_project->clear_filters(); + List<String> extension_list = platform->get_binary_extensions(current); + for (int i = 0; i < extension_list.size(); i++) { + export_project->add_filter("*." + extension_list[i] + " ; " + platform->get_name() + " Export"); + } + if (current->get_export_path() != "") { export_project->set_current_path(current->get_export_path()); } else { - String extension = platform->get_binary_extension(current); - if (extension != String()) { - export_project->add_filter("*." + extension + " ; " + platform->get_name() + " Export"); - export_project->set_current_file(default_filename + "." + extension); + if (extension_list.size() >= 1) { + export_project->set_current_file(default_filename + "." + extension_list[0]); } else { export_project->set_current_file(default_filename); } |