Added uncommitted changes

This commit is contained in:
YuSanka 2020-06-08 12:36:42 +02:00
parent befbd6b0fe
commit f74b1c6547

View File

@ -492,7 +492,7 @@ void ToolOrdering::assign_custom_gcodes(const Print &print)
for (unsigned int i : lt.extruders) for (unsigned int i : lt.extruders)
extruder_printing_above[i] = true; extruder_printing_above[i] = true;
// Skip all custom G-codes above this layer and skip all extruder switches. // Skip all custom G-codes above this layer and skip all extruder switches.
for (; custom_gcode_it != custom_gcode_per_print_z.gcodes.rend() && (custom_gcode_it->print_z > lt.print_z + EPSILON || custom_gcode_it->gcode == ToolChangeCode); ++ custom_gcode_it); for (; custom_gcode_it != custom_gcode_per_print_z.gcodes.rend() && (custom_gcode_it->print_z > lt.print_z + EPSILON || custom_gcode_it->type == CustomGCode::ToolChange); ++ custom_gcode_it);
if (custom_gcode_it == custom_gcode_per_print_z.gcodes.rend()) if (custom_gcode_it == custom_gcode_per_print_z.gcodes.rend())
// Custom G-codes were processed. // Custom G-codes were processed.
break; break;
@ -504,8 +504,8 @@ void ToolOrdering::assign_custom_gcodes(const Print &print)
print_z_below = it_lt_below->print_z; print_z_below = it_lt_below->print_z;
if (custom_gcode.print_z > print_z_below + 0.5 * EPSILON) { if (custom_gcode.print_z > print_z_below + 0.5 * EPSILON) {
// The custom G-code applies to the current layer. // The custom G-code applies to the current layer.
bool color_change = custom_gcode.gcode == ColorChangeCode; bool color_change = custom_gcode.type == CustomGCode::ColorChange;
bool tool_change = custom_gcode.gcode == ToolChangeCode; bool tool_change = custom_gcode.type == CustomGCode::ToolChange;
bool pause_or_custom_gcode = ! color_change && ! tool_change; bool pause_or_custom_gcode = ! color_change && ! tool_change;
bool apply_color_change = ! ignore_tool_and_color_changes && bool apply_color_change = ! ignore_tool_and_color_changes &&
// If it is color change, it will actually be useful as the exturder above will print. // If it is color change, it will actually be useful as the exturder above will print.