Fixed #126 (again)

Got burnt by the dodgy way I have implemented page up/down checking for the option KeyboardBrowseLCDScreen.
This commit is contained in:
Stephen White 2019-11-18 17:20:35 +11:00
parent 853e5181d9
commit b77fa6fb2d
1 changed files with 12 additions and 4 deletions

View File

@ -272,11 +272,15 @@ bool FileBrowser::BrowsableListView::CheckBrowseNavigation(bool pageOnly)
dirty = true; dirty = true;
} }
else else
{
if (!pageOnly)
{ {
list->currentIndex = 0; list->currentIndex = 0;
list->SetCurrent();
dirty = true; dirty = true;
} }
} }
}
if (inputMappings->BrowseUp()) if (inputMappings->BrowseUp())
{ {
if (list->currentIndex > 0) if (list->currentIndex > 0)
@ -291,11 +295,15 @@ bool FileBrowser::BrowsableListView::CheckBrowseNavigation(bool pageOnly)
dirty = true; dirty = true;
} }
else else
{
if (!pageOnly)
{ {
list->currentIndex = list->entries.size() - 1; list->currentIndex = list->entries.size() - 1;
list->SetCurrent();
dirty = true; dirty = true;
} }
} }
}
if ((lcdPgUpDown && inputMappings->BrowsePageDownLCD()) || (!lcdPgUpDown && inputMappings->BrowsePageDown())) if ((lcdPgUpDown && inputMappings->BrowsePageDownLCD()) || (!lcdPgUpDown && inputMappings->BrowsePageDown()))
{ {
u32 rowsMinus1 = rows - 1; u32 rowsMinus1 = rows - 1;