diff --git a/src/libslic3r/GCode/CoolingBuffer.cpp b/src/libslic3r/GCode/CoolingBuffer.cpp index 2197428bc..e88f3b38f 100644 --- a/src/libslic3r/GCode/CoolingBuffer.cpp +++ b/src/libslic3r/GCode/CoolingBuffer.cpp @@ -151,6 +151,7 @@ struct PerExtruderAdjustments } time_total += line.time; } + this->time_total = time_total; return time_total; } // Slow down each adjustable G-code line proportionally by a factor. @@ -166,6 +167,7 @@ struct PerExtruderAdjustments } time_total += line.time; } + this->time_total = time_total; return time_total; } @@ -204,6 +206,7 @@ struct PerExtruderAdjustments // Used by non-proportional slow down. void slow_down_to_feedrate(float min_feedrate) { assert(this->slow_down_min_speed < min_feedrate + EPSILON); + float time_total = 0.f; for (size_t i = 0; i < n_lines_adjustable; ++ i) { CoolingLine &line = lines[i]; if (line.feedrate > min_feedrate) { @@ -211,7 +214,9 @@ struct PerExtruderAdjustments line.feedrate = min_feedrate; line.slowdown = true; } + time_total += line.time; } + this->time_total = time_total; } // Extruder, for which the G-code will be adjusted.