Bläddra i källkod

Handle defer_return_to_status in lcd_goto_menu

Scott Lahteine 9 år sedan
förälder
incheckning
f5c2fb27cd
1 ändrade filer med 5 tillägg och 5 borttagningar
  1. 5
    5
      Marlin/ultralcd.cpp

+ 5
- 5
Marlin/ultralcd.cpp Visa fil

@@ -319,7 +319,10 @@ static void lcd_goto_menu(menuFunc_t menu, const bool feedback = false, const ui
319 319
       encoderPosition = encoder;
320 320
       if (feedback) lcd_quick_feedback();
321 321
     #endif
322
-    if (menu == lcd_status_screen) menu_history_depth = 0;
322
+    if (menu == lcd_status_screen) {
323
+      defer_return_to_status = false;
324
+      menu_history_depth = 0;
325
+    }
323 326
     #if ENABLED(LCD_PROGRESS_BAR)
324 327
       // For LCD_PROGRESS_BAR re-initialize custom characters
325 328
       lcd_set_custom_characters(menu == lcd_status_screen);
@@ -327,10 +330,7 @@ static void lcd_goto_menu(menuFunc_t menu, const bool feedback = false, const ui
327 330
   }
328 331
 }
329 332
 
330
-static void lcd_return_to_status() {
331
-  defer_return_to_status = false;
332
-  lcd_goto_menu(lcd_status_screen);
333
-}
333
+static void lcd_return_to_status() { lcd_goto_menu(lcd_status_screen); }
334 334
 
335 335
 inline void lcd_save_previous_menu() {
336 336
   if (menu_history_depth < COUNT(menu_history)) {

Laddar…
Avbryt
Spara