FIX: auto arranging crash due to wrong extruder_ids

jira: STUDIO-10449
Change-Id: Ia4614a67843c714c46e5fbf7c888a1ac45ef378d
(cherry picked from commit ef8e81c04aded239264a88f67ca3517be432775a)
This commit is contained in:
Arthur 2025-02-14 20:16:08 +08:00 committed by Noisyfox
parent 268cc08ea1
commit 7a0f07c424

View file

@ -3320,6 +3320,7 @@ void ModelInstance::get_arrange_polygon(void *ap, const Slic3r::DynamicPrintConf
if (op2 && (extruder_id = op2->getInt()) > 0) ret.extrude_ids.push_back(extruder_id);
}
ret.extrude_ids.erase(std::unique(ret.extrude_ids.begin(), ret.extrude_ids.end()), ret.extrude_ids.end());
if (ret.extrude_ids.empty()) //the default extruder
ret.extrude_ids.push_back(1);
}