From 4f5d216120b8f3872673030ebf5943ce4e42e3c7 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 28 May 2017 20:40:42 +0200 Subject: [PATCH] CChannelList: simplify calls of logo paints, avoid possible dub paints --- src/gui/channellist.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 3b08d8190..755e19707 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -1684,13 +1684,15 @@ void CChannelList::showChannelLogo() { if ((*chanlist).empty()) return; + if(g_settings.channellist_show_channellogo){ header->setChannelLogo((*chanlist)[selected]->getChannelID(), (*chanlist)[selected]->getName()); header->getChannelLogoObject()->hide(); header->getChannelLogoObject()->clearSavedScreen(); - header->getChannelLogoObject()->allowPaint(true); header->getChannelLogoObject()->paint(); } + else + header->setChannelLogo(0, string()); } #define NUM_LIST_BUTTONS_SORT 9 @@ -2150,16 +2152,7 @@ void CChannelList::paintHead() } } - if(g_settings.channellist_show_channellogo){ - //ensure to have clean background - header->getChannelLogoObject()->hide(); - header->setChannelLogo((*chanlist)[selected]->getChannelID(), (*chanlist)[selected]->getName()); - header->getChannelLogoObject()->allowPaint(false); - } - else - header->setChannelLogo(0, string()); header->paint(CC_SAVE_SCREEN_NO); - showChannelLogo(); } CComponentsHeader* CChannelList::getHeaderObject()