src/gui/channellist.cpp: fix to 36e95d7fbc if more bouquets empty

This commit is contained in:
Jacek Jendrzej
2013-03-27 16:18:32 +01:00
parent 3a68a4bf19
commit f4ae5e17ce

View File

@@ -749,11 +749,21 @@ int CChannelList::show()
if(bouquetList->Bouquets[nNext]->channelList->isEmpty() ) { if(bouquetList->Bouquets[nNext]->channelList->isEmpty() ) {
found = false; found = false;
nNext = (nNext + b_size + dir) % b_size; nNext = (nNext + b_size + dir) % b_size;
for (int i = nNext; i < b_size; i++) { if(msg == (neutrino_msg_t)g_settings.key_bouquet_down){
if( !bouquetList->Bouquets[i]->channelList->isEmpty() ) { for (int i = nNext; i > 0; i--) {
found = true; if( !bouquetList->Bouquets[i]->channelList->isEmpty() ) {
nNext = i; found = true;
break; nNext = i;
break;
}
}
}else{
for (int i = nNext; i < b_size; i++) {
if( !bouquetList->Bouquets[i]->channelList->isEmpty() ) {
found = true;
nNext = i;
break;
}
} }
} }
} }