From e61a66e4d6068418a4cdf90b0950c328ccf6b6f2 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Sat, 11 Oct 2014 15:49:43 +0400 Subject: [PATCH] gui/channellist.cpp: fix key pass to neutrino, after commit fa4333f948ff6d14bb417f750076041367076be3 --- src/gui/channellist.cpp | 50 +++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index abce11eee..3d8c691c4 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -697,11 +697,13 @@ int CChannelList::show() loop = false; } } - else if (!edit_state && (msg == CRCInput::RC_sat || msg == CRCInput::RC_favorites)) { - int newmode = msg == CRCInput::RC_sat ? LIST_MODE_SAT : LIST_MODE_FAV; - CNeutrinoApp::getInstance()->SetChannelMode(newmode); - res = CHANLIST_CHANGE_MODE; - loop = false; + else if (msg == CRCInput::RC_sat || msg == CRCInput::RC_favorites) { + if (!edit_state) { + int newmode = msg == CRCInput::RC_sat ? LIST_MODE_SAT : LIST_MODE_FAV; + CNeutrinoApp::getInstance()->SetChannelMode(newmode); + res = CHANLIST_CHANGE_MODE; + loop = false; + } } else if (!edit_state && msg == CRCInput::RC_setup) { fader.StopFade(); @@ -765,17 +767,19 @@ int CChannelList::show() dont_hide = true; } } - else if (!empty && msg == CRCInput::RC_ok ) { - if (move_state == beMoving) { - finishMoveChannel(); - } else if (edit_state) { - zapTo(selected); - actzap = true; - oldselected = selected; - paint(); // refresh zapped vs selected - } else if(SameTP()) { - zapOnExit = true; - loop=false; + else if (msg == CRCInput::RC_ok ) { + if (!empty) { + if (move_state == beMoving) { + finishMoveChannel(); + } else if (edit_state) { + zapTo(selected); + actzap = true; + oldselected = selected; + paint(); // refresh zapped vs selected + } else if(SameTP()) { + zapOnExit = true; + loop=false; + } } } else if (!edit_state && ( msg == CRCInput::RC_spkr ) && new_zap_mode ) { @@ -836,11 +840,13 @@ int CChannelList::show() } } } - else if(!edit_state && CRCInput::isNumeric(msg)) { - //pushback key if... - selected = oldselected; - g_RCInput->postMsg( msg, data ); - loop = false; + else if(CRCInput::isNumeric(msg)) { + if (!edit_state) { + //pushback key if... + selected = oldselected; + g_RCInput->postMsg( msg, data ); + loop = false; + } } else if (!empty && !edit_state && msg == CRCInput::RC_blue ) { @@ -899,7 +905,7 @@ int CChannelList::show() paintHead(); paint(); - } else if (msg > CRCInput::RC_MaxRC) { + } else { if ( CNeutrinoApp::getInstance()->handleMsg( msg, data ) & messages_return::cancel_all ) { loop = false; res = CHANLIST_CANCEL_ALL;