diff --git a/src/gui/filebrowser.cpp b/src/gui/filebrowser.cpp index d3f2b5081..96fd7493d 100644 --- a/src/gui/filebrowser.cpp +++ b/src/gui/filebrowser.cpp @@ -806,41 +806,6 @@ bool CFileBrowser::exec(const char * const dirname) msg_repeatok = CRCInput::RC_down; // jump to next item } } - else if ((msg == CRCInput::RC_red) || msg == (neutrino_msg_t) g_settings.key_pagedown) - { - if (!(filelist.empty())) { - unsigned int last = filelist.size() - 1; - if (selected != last && selected + listmaxshow >= filelist.size()) { - unsigned int prevselected = selected; - selected = last; - paintItem(prevselected - liststart); - paintItem(selected - liststart); - } - else - { - selected = (selected == last) ? 0 : selected + listmaxshow; - liststart = (selected / listmaxshow) * listmaxshow; - paint(); - } - } - } - else if (msg == CRCInput::RC_green || msg == (neutrino_msg_t) g_settings.key_pageup) - { - if (!(filelist.empty())) { - if (selected && selected < listmaxshow) { - unsigned int prevselected = selected; - selected = 0; - paintItem(prevselected - liststart); - paintItem(selected - liststart); - } - else - { - selected = selected ? selected - listmaxshow : filelist.size() - 1; - liststart = (selected/listmaxshow)*listmaxshow; - paint(); - } - } - } else if (msg_repeatok == CRCInput::RC_up) { if (!(filelist.empty())) @@ -930,6 +895,35 @@ bool CFileBrowser::exec(const char * const dirname) ChangeDir(".."); } } + else if ((msg == CRCInput::RC_red) || msg == (neutrino_msg_t) g_settings.key_pagedown) + { + if (!(filelist.empty())) { + unsigned int last = filelist.size() - 1; + if (selected != last && selected + listmaxshow >= filelist.size()) { + selected = last; + } + else + { + selected = (selected == last) ? 0 : selected + listmaxshow; + liststart = (selected / listmaxshow) * listmaxshow; + } + paint(); + } + } + else if (msg == CRCInput::RC_green || msg == (neutrino_msg_t) g_settings.key_pageup) + { + if (!(filelist.empty())) { + if (selected && selected < listmaxshow) { + selected = 0; + } + else + { + selected = selected ? selected - listmaxshow : filelist.size() - 1; + liststart = (selected/listmaxshow)*listmaxshow; + } + paint(); + } + } else if ( msg == CRCInput::RC_blue ) { if(Filter != NULL)