From b58e51118ec8377a09a7395213031b8afb0aa743 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sat, 20 Nov 2021 18:42:49 +0100 Subject: [PATCH] cc_item_picture: reset dimension if used blank image avoids unnecessary applying of old dimensions Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/3061d833804f85ff98aecb5cbfba36e980e72875 Author: Thilo Graf Date: 2021-11-20 (Sat, 20 Nov 2021) --- src/gui/components/cc_item_picture.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/gui/components/cc_item_picture.cpp b/src/gui/components/cc_item_picture.cpp index 61571183d..dd4ad80b8 100644 --- a/src/gui/components/cc_item_picture.cpp +++ b/src/gui/components/cc_item_picture.cpp @@ -159,10 +159,14 @@ void CComponentsChannelLogo::setChannel(const uint64_t &channelId, const std::st //if logo or alternate image not available, set has_logo to false has_logo = !image.empty(); if (!has_logo) + { image = "blank"; - - //refresh object - setPicture(image, w, h); + setPicture(image, 0, 0); + } + else + { + setPicture(image, w, h); + } //for sure, if no dimensions were detected set value of has_logo = false if (width && height && has_logo)