mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
ENH: custom gcode info should be owned by every plate
Change-Id: I5e5b000b7d04354d3c3cc311d089cb591a37501e
This commit is contained in:
@@ -1255,11 +1255,14 @@ std::vector<int> PartPlate::get_extruders(bool conside_custom_gcode) const
|
||||
}
|
||||
|
||||
if (conside_custom_gcode) {
|
||||
for (auto item : m_model->custom_gcode_per_print_z.gcodes) {
|
||||
if (item.type == CustomGCode::Type::ToolChange)
|
||||
plate_extruders.push_back(item.extruder);
|
||||
}
|
||||
}
|
||||
//BBS
|
||||
if (m_model->plates_custom_gcodes.find(m_plate_index) != m_model->plates_custom_gcodes.end()) {
|
||||
for (auto item : m_model->plates_custom_gcodes.at(m_plate_index).gcodes) {
|
||||
if (item.type == CustomGCode::Type::ToolChange)
|
||||
plate_extruders.push_back(item.extruder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::sort(plate_extruders.begin(), plate_extruders.end());
|
||||
auto it_end = std::unique(plate_extruders.begin(), plate_extruders.end());
|
||||
@@ -3080,7 +3083,11 @@ int PartPlateList::select_plate(int index)
|
||||
|
||||
m_current_plate = index;
|
||||
m_plate_list[m_current_plate]->set_selected();
|
||||
|
||||
|
||||
//BBS
|
||||
if(m_model)
|
||||
m_model->curr_plate_index = index;
|
||||
|
||||
//BBS update bed origin
|
||||
if (m_intialized && m_plater) {
|
||||
Vec2d pos = compute_shape_position(index, m_plate_cols);
|
||||
|
||||
Reference in New Issue
Block a user