FIX: add protection when sync presets from other printers

jira:STUDIO-12575

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I5a22129fe12a3600dcc4e3f387374122e349e38c
(cherry picked from commit 21863f925db1eeb1db79ba5859840aa23f852180)
This commit is contained in:
xun.zhang
2025-06-06 21:04:36 +08:00
committed by Noisyfox
parent af0c9f7ce2
commit e1626c26b1
3 changed files with 12 additions and 7 deletions

View File

@@ -924,7 +924,7 @@ bool PresetBundle::import_json_presets(PresetsConfigSubstitutions & s
const Preset &default_preset = collection->default_preset_for(config);
new_config = default_preset.config;
new_config.apply(std::move(config));
extend_default_config_length(new_config, default_preset.config);
extend_default_config_length(new_config, true, default_preset.config);
}
Preset &preset = collection->load_preset(collection->path_from_name(name, inherit_preset == nullptr), name, std::move(new_config), false);