From 1ee63e4f288045c3d910ca766705fc9990850de9 Mon Sep 17 00:00:00 2001 From: DallasHuff Date: Thu, 18 Dec 2025 10:10:48 -0600 Subject: [PATCH] Fixed export preset not duplicating selected files Previously, export presets did not duplicate selected files for excluding / including specific files in the export. This commit fixes it by duplicating the selected files. --- editor/export/editor_export_preset.cpp | 8 ++++++++ editor/export/editor_export_preset.h | 2 ++ editor/export/project_export.cpp | 2 ++ 3 files changed, 12 insertions(+) diff --git a/editor/export/editor_export_preset.cpp b/editor/export/editor_export_preset.cpp index ede81885fb7..a409dcad744 100644 --- a/editor/export/editor_export_preset.cpp +++ b/editor/export/editor_export_preset.cpp @@ -259,6 +259,14 @@ Vector EditorExportPreset::get_files_to_export() const { return files; } +HashSet EditorExportPreset::get_selected_files() const { + return selected_files; +} + +void EditorExportPreset::set_selected_files(const HashSet &p_files) { + selected_files = p_files; +} + Dictionary EditorExportPreset::get_customized_files() const { Dictionary files; for (const KeyValue &E : customized_files) { diff --git a/editor/export/editor_export_preset.h b/editor/export/editor_export_preset.h index 6d87fa9df92..7cc0fb64939 100644 --- a/editor/export/editor_export_preset.h +++ b/editor/export/editor_export_preset.h @@ -123,6 +123,8 @@ public: void update_value_overrides(); Vector get_files_to_export() const; + HashSet get_selected_files() const; + void set_selected_files(const HashSet &p_files); Dictionary get_customized_files() const; int get_customized_files_count() const; void set_customized_files(const Dictionary &p_files); diff --git a/editor/export/project_export.cpp b/editor/export/project_export.cpp index c7c9ea5e30a..4de69955eff 100644 --- a/editor/export/project_export.cpp +++ b/editor/export/project_export.cpp @@ -756,6 +756,8 @@ void ProjectExportDialog::_duplicate_preset() { preset->set_export_filter(current->get_export_filter()); preset->set_include_filter(current->get_include_filter()); preset->set_exclude_filter(current->get_exclude_filter()); + preset->set_customized_files(current->get_customized_files()); + preset->set_selected_files(current->get_selected_files()); preset->set_patches(current->get_patches()); preset->set_patch_delta_encoding_enabled(current->is_patch_delta_encoding_enabled()); preset->set_patch_delta_zstd_level(current->get_patch_delta_zstd_level());