FIX: [STUDIO-2547] import config yes/no to all

Change-Id: Ib5812c4af3d9fcbe45fe1d884a8bcf29d2f4f704
This commit is contained in:
chunmao.guo 2023-03-23 11:00:14 +08:00 committed by Lane.Wei
parent ee6bf4d4de
commit 2a1f8af62e
1 changed files with 5 additions and 4 deletions

View File

@ -650,16 +650,17 @@ PresetsConfigSubstitutions PresetBundle::import_presets(std::vector<std::string>
BOOST_LOG_TRIVIAL(warning) << "Preset type is unknown, not loading: " << name;
continue;
}
if (overwrite == 0) overwrite = 1;
if (auto p = collection->find_preset(name, false)) {
if (p->is_default || p->is_system) {
BOOST_LOG_TRIVIAL(warning) << "Preset already present and is system preset, not loading: " << name;
continue;
}
overwrite = override_confirm(name);
if (overwrite == 0 || overwrite == 2) {
BOOST_LOG_TRIVIAL(warning) << "Preset already present, not loading: " << name;
continue;
}
}
if (overwrite == 0 || overwrite == 2) {
BOOST_LOG_TRIVIAL(warning) << "Preset already present, not loading: " << name;
continue;
}
DynamicPrintConfig new_config;