FIX: not transfer filament param copy variants

Change-Id: I2fea8a692506ce8c1def6ec4700c788fa31cf7be
Jira: none
This commit is contained in:
chunmao.guo 2025-04-09 15:51:34 +08:00 committed by lane.wei
parent a29cb80bc7
commit ad049d1a90
2 changed files with 3 additions and 1 deletions

View File

@ -456,7 +456,7 @@ void ConfigBase::apply_only(const ConfigBase &other, const t_config_option_keys
auto my_opt2 = dynamic_cast<ConfigOptionVectorBase*>(this->option(opt_key2));
auto other_opt = other.option(opt_key2);
if (my_opt2 == nullptr && other_opt)
my_opt2 = dynamic_cast<ConfigOptionVectorBase*>(other_opt->clone());
my_opt2 = dynamic_cast<ConfigOptionVectorBase *>(this->option(opt_key2, true));
if (my_opt2) {
int index = std::atoi(opt_key.c_str() + n + 1);
if (other_opt)

View File

@ -5222,6 +5222,8 @@ bool Tab::may_discard_current_dirty_preset(PresetCollection* presets /*= nullptr
std::vector<std::string> variant_options;
for (auto &opt : cache_options) {
if (auto n = opt.find('#'); n != std::string::npos) {
if (type == Preset::TYPE_FILAMENT && filament_options_with_variant.count(opt.substr(0, n)) == 0)
continue;
variant_options.push_back(opt.substr(0, n));
opt.clear();
}