Add TURBO_BACK_MENU_ITEM option (#14991)
This commit is contained in:
@ -88,10 +88,21 @@ void MarlinUI::save_previous_screen() {
|
||||
screen_history[screen_history_depth++] = { currentScreen, encoderPosition, encoderTopLine, screen_items };
|
||||
}
|
||||
|
||||
void MarlinUI::goto_previous_screen() {
|
||||
void MarlinUI::goto_previous_screen(
|
||||
#if ENABLED(TURBO_BACK_MENU_ITEM)
|
||||
const bool is_back/*=false*/
|
||||
#endif
|
||||
) {
|
||||
#if DISABLED(TURBO_BACK_MENU_ITEM)
|
||||
constexpr bool is_back = false;
|
||||
#endif
|
||||
if (screen_history_depth > 0) {
|
||||
menuPosition &sh = screen_history[--screen_history_depth];
|
||||
goto_screen(sh.menu_function, sh.encoder_position, sh.top_line, sh.items);
|
||||
goto_screen(sh.menu_function,
|
||||
is_back ? 0 : sh.encoder_position,
|
||||
is_back ? 0 : sh.top_line,
|
||||
sh.items
|
||||
);
|
||||
}
|
||||
else
|
||||
return_to_status();
|
||||
|
Reference in New Issue
Block a user