ENH: save ams list to compare with last sync

Change-Id: I44db0b0a61cf366929aed6ab703407e5d9b170b7
This commit is contained in:
chunmao.guo 2023-02-06 10:54:26 +08:00 committed by Lane.Wei
parent ddf8c216c6
commit b3a4384aec
7 changed files with 34 additions and 10 deletions

View file

@ -376,6 +376,7 @@ void PresetComboBox::add_ams_filaments(std::string selected, bool alias_name)
auto &filaments = m_collection->get_presets();
for (auto &f : m_preset_bundle->filament_ams_list) {
std::string filament_id = f.opt_string("filament_id", 0u);
if (filament_id.empty()) continue;
auto iter = std::find_if(filaments.begin(), filaments.end(),
[&filament_id](auto &f) { return f.is_compatible && f.is_system && f.filament_id == filament_id; });
if (iter == filaments.end()) {