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.
This commit is contained in:
Thilo Graf
2016-06-02 16:48:35 +02:00
parent be2417068e
commit 69ab25e111

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);