Skip to content

Commit

Permalink
Fixed #126 (again)
Browse files Browse the repository at this point in the history
Got burnt by the dodgy way I have implemented page up/down checking for the option KeyboardBrowseLCDScreen.
  • Loading branch information
pi1541 committed Nov 18, 2019
1 parent 853e518 commit b77fa6f
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/FileBrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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()))
Expand Down

0 comments on commit b77fa6f

Please sign in to comment.