From dd42d5600bc3772b92d7d0306fd021037e37094a Mon Sep 17 00:00:00 2001 From: Tom Marshall Date: Fri, 25 Jul 2014 15:07:15 -0700 Subject: sr: Fix menu wrapping Reset menu_show_start_ if the selected item won't be visible. This fixes the display after selecting an item from the second page in the file list. Change-Id: Iff2bef39ec294c47bcaadce4128adb6d14d9e4db --- screen_ui.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/screen_ui.cpp b/screen_ui.cpp index 5ed74a6..aef714b 100644 --- a/screen_ui.cpp +++ b/screen_ui.cpp @@ -815,6 +815,10 @@ void ScreenRecoveryUI::StartMenu(const char* const * headers, const char* const menu_items = i; show_menu = true; menu_sel = initial_selection; + if (menu_show_start_ <= menu_sel - max_menu_rows_ || + menu_show_start_ > menu_sel) { + menu_show_start_ = menu_sel; + } update_screen_locked(); } pthread_mutex_unlock(&updateMutex); -- cgit v1.1