FIX: [STUDIO-2243] transfer indexed config with main key

Change-Id: I4930dfc2e86902eb3be9d8624dbad08a82bf82bc
This commit is contained in:
chunmao.guo 2023-02-13 16:25:51 +08:00 committed by Lane.Wei
parent f3af4558ce
commit 8d7fb45164

View file

@ -5004,7 +5004,12 @@ bool GUI_App::check_and_keep_current_preset_changes(const wxString& caption, con
static_cast<TabPrinter*>(tab)->cache_extruder_cnt();
}
}
tab->cache_config_diff(selected_options);
std::vector<std::string> selected_options2;
std::transform(selected_options.begin(), selected_options.end(), std::back_inserter(selected_options2), [](auto & o) {
auto i = o.find('#');
return i != std::string::npos ? o.substr(0, i) : o;
});
tab->cache_config_diff(selected_options2);
if (!is_called_from_configwizard)
tab->m_presets->discard_current_changes();
}