Skip to content

Commit

Permalink
Clear menu history for browse media on insert (MarlinFirmware#20236)
Browse files Browse the repository at this point in the history
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
  • Loading branch information
2 people authored and zillarob committed Feb 25, 2021
1 parent 84f456b commit a63e143
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Marlin/src/lcd/menu/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ void MarlinUI::goto_screen(screenFunc_t screen, const uint16_t encoder/*=0*/, co
screen_items = items;
if (on_status_screen()) {
defer_status_screen(false);
clear_menu_history();
TERN_(AUTO_BED_LEVELING_UBL, ubl.lcd_map_control = false);
screen_history_depth = 0;
}

clear_lcd();
Expand Down
3 changes: 3 additions & 0 deletions Marlin/src/lcd/menu/menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,3 +249,6 @@ void _lcd_draw_homing();
#if ENABLED(TOUCH_SCREEN_CALIBRATION)
void touch_screen_calibration();
#endif

extern uint8_t screen_history_depth;
inline void clear_menu_history() { screen_history_depth = 0; }

0 comments on commit a63e143

Please sign in to comment.