FIX: filament preset order PLA by name

Change-Id: Iac37eaa9bb216f3613c50d183df1cf2e1fcc65cb
Jira: STUDIO-7854
This commit is contained in:
chunmao.guo 2024-09-13 09:27:25 +08:00 committed by Lane.Wei
parent e3c534cd64
commit fe8b819a69
1 changed files with 2 additions and 0 deletions

View File

@ -1054,6 +1054,8 @@ void PlaterPresetComboBox::update()
std::sort(list.begin(), list.end(), [&preset_filament_types, &first_types](auto *l, auto *r) { std::sort(list.begin(), list.end(), [&preset_filament_types, &first_types](auto *l, auto *r) {
auto iter1 = std::find(first_types.begin(), first_types.end(), preset_filament_types[l->first]); auto iter1 = std::find(first_types.begin(), first_types.end(), preset_filament_types[l->first]);
auto iter2 = std::find(first_types.begin(), first_types.end(), preset_filament_types[r->first]); auto iter2 = std::find(first_types.begin(), first_types.end(), preset_filament_types[r->first]);
if (iter1 == iter2)
return l->first < r->first;
return iter1 < iter2; return iter1 < iter2;
}); });
for (auto it : list) { for (auto it : list) {