PFW-1561 Use did_pause_print explicitly

print_job_timer is stopped at this point so print_job_timer.paused() always yields false.
For this reason here we only need to check did_pause_print. I think this makes the code
a bit easier to read and gives a reason why we are clearing the flag at the end of the function.
This commit is contained in:
gudnimg 2024-09-14 12:50:21 +00:00
parent a4ee731a53
commit 0fadb210dd
1 changed files with 1 additions and 3 deletions

View File

@ -5682,9 +5682,7 @@ void lcd_print_stop_finish()
// The print was aborted while when the nozzle was cold: // The print was aborted while when the nozzle was cold:
// 1. in a paused state => a partial backup in RAM is always available // 1. in a paused state => a partial backup in RAM is always available
// 2. after a recoverable thermal/fan error had paused the print => only extruder temperature is saved to RAM // 2. after a recoverable thermal/fan error had paused the print => only extruder temperature is saved to RAM
if (printingIsPaused()) if (did_pause_print) {
{
// Restore temperature saved in ram after pausing print
restore_extruder_temperature_from_ram(); restore_extruder_temperature_from_ram();
} }