mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-06 06:06:14 +08:00
Fix issue that total_time
is not updated after slowing down
This commit is contained in:
parent
dc943eddaf
commit
4bb6525c4f
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user