[Icon Item] Also clear image icon when using Plasma Svg

When changing an IconItem from using a local image (e.g. PNG file) to using a Plasma themed icon,
the implicit size wasn't updated since the old image was still loaded in m_imageIcon.
Clearing it when clearing the other icon stores fixes this.

BUG: 405298

Differential Revision: https://phabricator.kde.org/D19674
This commit is contained in:
Kai Uwe Broulik 2019-03-11 13:27:37 +01:00
parent e77bf0f5d6
commit 017954185c

View File

@ -187,6 +187,7 @@ void IconItem::setSource(const QVariant &source)
//success?
if (m_usesPlasmaTheme && m_svgIcon->isValid() && m_svgIcon->hasElement(sourceString)) {
m_icon = QIcon();
m_imageIcon = QImage();
m_svgIconName = sourceString;
//ok, svg not available from the plasma theme
} else {