diff options
author | Sergey Minakov <naithar@icloud.com> | 2021-07-13 21:30:19 +0300 |
---|---|---|
committer | Sergey Minakov <naithar@icloud.com> | 2021-07-13 21:30:19 +0300 |
commit | aa321f0a244fd0a8c072806a12203b8de9b50135 (patch) | |
tree | 80f1ca321a271b4e9a7c7c952fb8aa54f08e14f7 /platform/iphone/export/export.cpp | |
parent | 7bc52e56c093342255c389fcc652eda2ced40b39 (diff) |
[iOS] Fix plugin configuration loading
Clear ConfigFile parameter before loading new file.
Ignore duplicate input plist keys
Diffstat (limited to 'platform/iphone/export/export.cpp')
-rw-r--r-- | platform/iphone/export/export.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/platform/iphone/export/export.cpp b/platform/iphone/export/export.cpp index 523dc555f1..f21a14e84b 100644 --- a/platform/iphone/export/export.cpp +++ b/platform/iphone/export/export.cpp @@ -368,6 +368,8 @@ void EditorExportPlatformIOS::get_export_options(List<ExportOption> *r_options) r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "plugins/" + found_plugins[i].name), false)); } + Set<String> plist_keys; + for (int i = 0; i < found_plugins.size(); i++) { // Editable plugin plist values PluginConfigIOS plugin = found_plugins[i]; @@ -379,7 +381,10 @@ void EditorExportPlatformIOS::get_export_options(List<ExportOption> *r_options) switch (item.type) { case PluginConfigIOS::PlistItemType::STRING_INPUT: { String preset_name = "plugins_plist/" + key; - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, preset_name), item.value)); + if (!plist_keys.has(preset_name)) { + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, preset_name), item.value)); + plist_keys.insert(preset_name); + } } break; default: continue; |