Browse Source

Merge pull request #1780 from MRprusa3d/PFW-841

"stop" immediately after "pause" patch
Marek Běl 5 years ago
parent
commit
177c123b4d
1 changed files with 5 additions and 2 deletions
  1. 5 2
      Firmware/ultralcd.cpp

+ 5 - 2
Firmware/ultralcd.cpp

@@ -1046,8 +1046,11 @@ void lcd_commands()
 		{
 			lcd_setstatuspgm(_i("Print paused"));////MSG_PRINT_PAUSED c=20 r=1
 			long_pause();
-			lcd_commands_type = 0;
-			lcd_commands_step = 0;
+               if (lcd_commands_type == LCD_COMMAND_LONG_PAUSE) // !!! because "lcd_commands_type" can be changed during/inside "long_pause()"
+               {
+                    lcd_commands_type = 0;
+                    lcd_commands_step = 0;
+               }
 		}
 	}