Code refactoring to mode comparison

This commit is contained in:
YuSanka 2020-01-17 11:38:52 +01:00
parent cc19e9c48f
commit 2259f7b3e8
10 changed files with 126 additions and 93 deletions

View file

@ -1847,7 +1847,7 @@ std::vector<std::pair<double, unsigned int>> custom_tool_changes(const Model &mo
{
std::vector<std::pair<double, unsigned int>> custom_tool_changes;
for (const Model::CustomGCode &custom_gcode : model.custom_gcode_per_print_z.gcodes)
if (custom_gcode.gcode == ExtruderChangeCode) {
if (custom_gcode.gcode == ToolChangeCode) {
// If extruder count in PrinterSettings was changed, use default (0) extruder for extruders, more than num_extruders
custom_tool_changes.emplace_back(custom_gcode.print_z, static_cast<unsigned int>(custom_gcode.extruder > num_extruders ? 1 : custom_gcode.extruder));
}