diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 6e7f8b625..d8462cfc7 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -98,6 +98,7 @@ CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vl frameBuffer = CFrameBuffer::getInstance(); name = pName; selected = 0; + selected_in_new_mode = 0; liststart = 0; tuned=0xfffffff; zapProtection = NULL; @@ -557,9 +558,15 @@ int CChannelList::show() } } else if ( ( msg == CRCInput::RC_timeout ) || ( msg == (neutrino_msg_t)g_settings.key_channelList_cancel) ) { - if(!actzap) - selected = oldselected; res = -1; + if(!actzap){ + selected = oldselected; + } + else{ + res = -4; + selected = selected_in_new_mode; + } + if ( fadeIn ) { g_RCInput->killTimer(fadeTimer); fadeTimer = 0; @@ -1054,6 +1061,13 @@ printf("**************************** CChannelList::zapTo me %p %s tuned %d new % if ( pos!=(int)tuned ) { tuned = pos; g_RemoteControl->zapTo_ChannelID(chan->channel_id, chan->name, !chan->bAlwaysLocked); // UTF-8 + // TODO check is it possible bouquetList is NULL ? + if (bouquetList != NULL) { + CNeutrinoApp::getInstance()->channelList->adjustToChannelID(chan->channel_id); + } + if(this->new_mode_active) + selected_in_new_mode = pos; + } if(!this->new_mode_active) { selected = pos; @@ -1067,10 +1081,6 @@ printf("**************************** CChannelList::zapTo me %p %s tuned %d new % g_InfoViewer->handleMsg(NeutrinoMessages::EVT_RECORDMODE, 0); } - // TODO check is it possible bouquetList is NULL ? - if (bouquetList != NULL) { - CNeutrinoApp::getInstance()->channelList->adjustToChannelID(chan->channel_id); - } g_RCInput->postMsg( NeutrinoMessages::SHOW_INFOBAR, 0 ); } } diff --git a/src/gui/channellist.h b/src/gui/channellist.h index c6caf929a..b45411af0 100644 --- a/src/gui/channellist.h +++ b/src/gui/channellist.h @@ -55,7 +55,7 @@ class CChannelList { private: CFrameBuffer *frameBuffer; - unsigned int selected; + unsigned int selected, selected_in_new_mode; t_channel_id selected_chid; CLastChannel lastChList; unsigned int liststart;