From c4b67751af11e3b3cbe2eacbef0a1610c99c88ea Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Wed, 27 Mar 2013 16:18:32 +0100 Subject: [PATCH] src/gui/channellist.cpp: fix to 06ac21d495f5ecddccb4f19a0aed14e2979bd5a7 if more bouquets empty Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/f4ae5e17ce00575de61daba517f37a4bb9252836 Author: Jacek Jendrzej Date: 2013-03-27 (Wed, 27 Mar 2013) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/channellist.cpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 316ae5798..ed422e7f1 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -749,11 +749,21 @@ int CChannelList::show() if(bouquetList->Bouquets[nNext]->channelList->isEmpty() ) { found = false; nNext = (nNext + b_size + dir) % b_size; - for (int i = nNext; i < b_size; i++) { - if( !bouquetList->Bouquets[i]->channelList->isEmpty() ) { - found = true; - nNext = i; - break; + if(msg == (neutrino_msg_t)g_settings.key_bouquet_down){ + for (int i = nNext; i > 0; i--) { + if( !bouquetList->Bouquets[i]->channelList->isEmpty() ) { + found = true; + nNext = i; + break; + } + } + }else{ + for (int i = nNext; i < b_size; i++) { + if( !bouquetList->Bouquets[i]->channelList->isEmpty() ) { + found = true; + nNext = i; + break; + } } } }