mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-10 00:07:52 -06:00
FIX: [STUDIO-1933] show ams filament as Generic type if id not found
Change-Id: I5ffd499ea16275479c6685dc6795ad240f59fa37
This commit is contained in:
parent
110beef8e1
commit
851cdad5f3
1 changed files with 5 additions and 0 deletions
|
@ -378,6 +378,11 @@ void PresetComboBox::add_ams_filaments(std::string selected, bool alias_name)
|
|||
std::string filament_id = f.opt_string("filament_id", 0u);
|
||||
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()) {
|
||||
auto filament_type = "Generic " + f.opt_string("filament_type", 0u);
|
||||
iter = std::find_if(filaments.begin(), filaments.end(),
|
||||
[&filament_type](auto &f) { return f.is_compatible && f.is_system && boost::algorithm::starts_with(f.name, filament_type); });
|
||||
}
|
||||
if (iter == filaments.end()) {
|
||||
BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << boost::format(": filament_id %1% not found or system or compatible") % filament_id;
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue