From 25653df890c349616652c2bde55a91a211f303f9 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 36e95d7fbcd22dfbb94d03867f10634f7a72df63 if more bouquets empty --- 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 9607a31c7..f2eea0ca5 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -745,11 +745,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; + } } } }