mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-14 09:02:06 +00:00
Validate invalid fields for hidden system profiles (#11455)
* Fix issue that for invisible system profiles, invalid fields are not removed * Fix wrong note field
This commit is contained in:
@@ -85,7 +85,7 @@
|
||||
"min_layer_height": [
|
||||
"0.08"
|
||||
],
|
||||
"notes": "optimized Eryone ER20 Klipper configuration with E3D Hotend, BMG directdrive, printable height limited to 190 because of the top of the directdrive and Z-Sync mod",
|
||||
"printer_notes": "optimized Eryone ER20 Klipper configuration with E3D Hotend, BMG directdrive, printable height limited to 190 because of the top of the directdrive and Z-Sync mod",
|
||||
"nozzle_diameter": [
|
||||
"0.4"
|
||||
],
|
||||
|
||||
@@ -3891,6 +3891,14 @@ std::pair<PresetsConfigSubstitutions, size_t> PresetBundle::load_vendor_configs_
|
||||
config.apply(config_src);
|
||||
extend_default_config_length(config, true, *default_config);
|
||||
if (instantiation == "false" && "Template" != vendor_name) {
|
||||
// Report configuration fields, which are misplaced into a wrong group.
|
||||
std::string incorrect_keys = Preset::remove_invalid_keys(config, *default_config);
|
||||
if (!incorrect_keys.empty()) {
|
||||
++m_errors;
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << ": The config " << subfile << " contains incorrect keys: " << incorrect_keys
|
||||
<< ", which were removed";
|
||||
}
|
||||
|
||||
config_maps.emplace(preset_name, std::move(config));
|
||||
if ((presets_collection->type() == Preset::TYPE_FILAMENT) && (!filament_id.empty()))
|
||||
filament_id_maps.emplace(preset_name, filament_id);
|
||||
|
||||
Reference in New Issue
Block a user