mirror of
https://github.com/godotengine/godot.git
synced 2024-11-24 05:04:10 +00:00
[iOS] Fix plugin configuration loading
Clear ConfigFile parameter before loading new file. Ignore duplicate input plist keys
This commit is contained in:
parent
7bc52e56c0
commit
aa321f0a24
@ -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;
|
||||
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;
|
||||
|
@ -252,6 +252,8 @@ static inline PluginConfigIOS load_plugin_config(Ref<ConfigFile> config_file, co
|
||||
return plugin_config;
|
||||
}
|
||||
|
||||
config_file->clear();
|
||||
|
||||
Error err = config_file->load(path);
|
||||
|
||||
if (err != OK) {
|
||||
|
Loading…
Reference in New Issue
Block a user