gui/channellist.cpp: set oldselected to selected on sort mode change,

else wrong selected restored on exit;
store channel to history only if adjustToChannelID called with bToo == true, which means zap


Origin commit data
------------------
Branch: ni/coolstream
Commit: 89423d49b4
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2013-04-09 (Tue, 09 Apr 2013)



------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2013-04-09 13:10:56 +04:00
parent 2e69c38b88
commit f84e0a82c6

View File

@@ -876,6 +876,7 @@ int CChannelList::show()
if(g_settings.channellist_sort_mode > SORT_MAX-1) if(g_settings.channellist_sort_mode > SORT_MAX-1)
g_settings.channellist_sort_mode = SORT_ALPHA; g_settings.channellist_sort_mode = SORT_ALPHA;
CNeutrinoApp::getInstance()->SetChannelMode(mode); CNeutrinoApp::getInstance()->SetChannelMode(mode);
oldselected = selected;
paintHead(); // update button bar paintHead(); // update button bar
paint(); paint();
} }
@@ -1063,9 +1064,11 @@ bool CChannelList::adjustToChannelID(const t_channel_id channel_id, bool bToo)
selected = i; selected = i;
tuned = i; tuned = i;
lastChList.store (selected, channel_id, false); //lastChList.store (selected, channel_id, false);
if (bToo) { if (bToo) {
lastChList.store (selected, channel_id, false);
int old_mode = CNeutrinoApp::getInstance()->GetChannelMode(); int old_mode = CNeutrinoApp::getInstance()->GetChannelMode();
int new_mode = old_mode; int new_mode = old_mode;
bool has_channel; bool has_channel;