From f84e0a82c67b922f0ff4dfbcb3074d3700136421 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Tue, 9 Apr 2013 13:10:56 +0400 Subject: [PATCH] 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: https://github.com/neutrino-images/ni-neutrino/commit/89423d49b4af3637e0b89d5a930262c47b2b4197 Author: [CST] Focus Date: 2013-04-09 (Tue, 09 Apr 2013) ------------------ This commit was generated by Migit --- src/gui/channellist.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 02e53d912..f08c03974 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -876,6 +876,7 @@ int CChannelList::show() if(g_settings.channellist_sort_mode > SORT_MAX-1) g_settings.channellist_sort_mode = SORT_ALPHA; CNeutrinoApp::getInstance()->SetChannelMode(mode); + oldselected = selected; paintHead(); // update button bar paint(); } @@ -1063,9 +1064,11 @@ bool CChannelList::adjustToChannelID(const t_channel_id channel_id, bool bToo) selected = i; tuned = i; - lastChList.store (selected, channel_id, false); + //lastChList.store (selected, channel_id, false); if (bToo) { + lastChList.store (selected, channel_id, false); + int old_mode = CNeutrinoApp::getInstance()->GetChannelMode(); int new_mode = old_mode; bool has_channel;