Touch-to-jog on edit screens (#18266)

This commit is contained in:
Victor
2020-06-11 23:21:18 -03:00
committed by GitHub
parent eef2931150
commit 1d504e596d
3 changed files with 16 additions and 9 deletions

View File

@ -84,9 +84,8 @@ void MarlinUI::save_previous_screen() {
}
void MarlinUI::_goto_previous_screen(TERN_(TURBO_BACK_MENU_ITEM, const bool is_back/*=false*/)) {
#if DISABLED(TURBO_BACK_MENU_ITEM)
constexpr bool is_back = false;
#endif
TERN(TURBO_BACK_MENU_ITEM,,constexpr bool is_back = false);
TERN_(TOUCH_BUTTONS, on_edit_screen = false);
if (screen_history_depth > 0) {
menuPosition &sh = screen_history[--screen_history_depth];
goto_screen(sh.menu_function,
@ -155,6 +154,7 @@ void MenuEditItemBase::goto_edit_screen(
const screenFunc_t cb, // Callback after edit
const bool le // Flag to call cb() during editing
) {
TERN_(TOUCH_BUTTONS, ui.on_edit_screen = true);
ui.screen_changed = true;
ui.save_previous_screen();
ui.refresh();