Clear menu history for browse media on insert (#20236)
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
This commit is contained in:
parent
89b56ca5c2
commit
e19c016c74
|
@ -1625,6 +1625,7 @@ void MarlinUI::update() {
|
||||||
if (old_status < 2) {
|
if (old_status < 2) {
|
||||||
TERN_(EXTENSIBLE_UI, ExtUI::onMediaInserted()); // ExtUI response
|
TERN_(EXTENSIBLE_UI, ExtUI::onMediaInserted()); // ExtUI response
|
||||||
#if ENABLED(BROWSE_MEDIA_ON_INSERT)
|
#if ENABLED(BROWSE_MEDIA_ON_INSERT)
|
||||||
|
clear_menu_history();
|
||||||
quick_feedback();
|
quick_feedback();
|
||||||
goto_screen(MEDIA_MENU_GATEWAY);
|
goto_screen(MEDIA_MENU_GATEWAY);
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -206,8 +206,8 @@ void MarlinUI::goto_screen(screenFunc_t screen, const uint16_t encoder/*=0*/, co
|
||||||
screen_items = items;
|
screen_items = items;
|
||||||
if (on_status_screen()) {
|
if (on_status_screen()) {
|
||||||
defer_status_screen(false);
|
defer_status_screen(false);
|
||||||
|
clear_menu_history();
|
||||||
TERN_(AUTO_BED_LEVELING_UBL, ubl.lcd_map_control = false);
|
TERN_(AUTO_BED_LEVELING_UBL, ubl.lcd_map_control = false);
|
||||||
screen_history_depth = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
clear_lcd();
|
clear_lcd();
|
||||||
|
|
|
@ -249,3 +249,6 @@ void _lcd_draw_homing();
|
||||||
#if ENABLED(TOUCH_SCREEN_CALIBRATION)
|
#if ENABLED(TOUCH_SCREEN_CALIBRATION)
|
||||||
void touch_screen_calibration();
|
void touch_screen_calibration();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern uint8_t screen_history_depth;
|
||||||
|
inline void clear_menu_history() { screen_history_depth = 0; }
|
||||||
|
|
|
@ -104,8 +104,6 @@ class MenuItem_sdfolder : public MenuItem_sdbase {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
extern uint8_t screen_history_depth;
|
|
||||||
|
|
||||||
void menu_media() {
|
void menu_media() {
|
||||||
ui.encoder_direction_menus();
|
ui.encoder_direction_menus();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue