From b77fa6fb2d0d46d206493fe0e4e3f9b4f69e803b Mon Sep 17 00:00:00 2001 From: Stephen White Date: Mon, 18 Nov 2019 17:20:35 +1100 Subject: [PATCH] Fixed #126 (again) Got burnt by the dodgy way I have implemented page up/down checking for the option KeyboardBrowseLCDScreen. --- src/FileBrowser.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/FileBrowser.cpp b/src/FileBrowser.cpp index 5b2ff78..af10ddb 100644 --- a/src/FileBrowser.cpp +++ b/src/FileBrowser.cpp @@ -273,8 +273,12 @@ bool FileBrowser::BrowsableListView::CheckBrowseNavigation(bool pageOnly) } else { - list->currentIndex = 0; - dirty = true; + if (!pageOnly) + { + list->currentIndex = 0; + list->SetCurrent(); + dirty = true; + } } } if (inputMappings->BrowseUp()) @@ -292,8 +296,12 @@ bool FileBrowser::BrowsableListView::CheckBrowseNavigation(bool pageOnly) } else { - list->currentIndex = list->entries.size() - 1; - dirty = true; + if (!pageOnly) + { + list->currentIndex = list->entries.size() - 1; + list->SetCurrent(); + dirty = true; + } } } if ((lcdPgUpDown && inputMappings->BrowsePageDownLCD()) || (!lcdPgUpDown && inputMappings->BrowsePageDown()))