ENH: custom gcode info should be owned by every plate

Change-Id: I5e5b000b7d04354d3c3cc311d089cb591a37501e
This commit is contained in:
liz.li 2023-02-01 17:38:02 +08:00 committed by Lane.Wei
parent 5f71eba979
commit e7ea07944f
16 changed files with 545 additions and 680 deletions

View file

@ -336,9 +336,12 @@ std::vector<unsigned int> Print::extruders(bool conside_custom_gcode) const
append(extruders, this->support_material_extruders());
if (conside_custom_gcode) {
for (auto item : m_model.custom_gcode_per_print_z.gcodes) {
if (item.type == CustomGCode::Type::ToolChange)
extruders.push_back((unsigned int)item.extruder);
//BBS
for (auto plate_data : m_model.plates_custom_gcodes) {
for (auto item : plate_data.second.gcodes) {
if (item.type == CustomGCode::Type::ToolChange)
extruders.push_back((unsigned int)item.extruder);
}
}
}