CComponentsChannelLogo: rework logic of inital statement in setChannel()

This should fix missing logos on existant chnannellogo instances.
For example, this was to see if user has opened eventlist and
opens timerlist with button '0'. After closed timerlist logos were lost.


Origin commit data
------------------
Branch: ni/coolstream
Commit: 69ab25e111
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-06-02 (Thu, 02 Jun 2016)



------------------
This commit was generated by Migit
This commit is contained in:
2016-06-02 16:48:35 +02:00
parent 7e62915fdf
commit 9b31034206

View File

@@ -399,17 +399,15 @@ void CComponentsChannelLogo::setAltLogo(const char* picture_name)
void CComponentsChannelLogo::setChannel(const uint64_t& channelId, const std::string& channelName)
{
if (channel_id)
if (channel_id == channelId)
return;
channel_id = channelId;
if (!channel_name.empty())
if (channel_name == channelName)
return;
need_init = true;
if (channelId || !channelName.empty()){
if ((channel_id == channelId) && (channel_name == channelName))
need_init = false;
}
channel_id = channelId;
channel_name = channelName;
int dummy;
has_logo = g_PicViewer->GetLogoName(channel_id, channel_name, pic_name, &dummy, &dummy);