From 8cf9811ec378b9903e3f64d027f625d9ab0ac7db Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Wed, 22 Jan 2014 11:01:14 +0100 Subject: Do not overwrite basePixmap of QIconLoader PixmapEntry Change-Id: I4799af1d9151ba4b0952369e9620d2fab2b002d9 Reviewed-by: David Sansome Reviewed-by: Jens Bache-Wiig --- src/gui/image/qiconloader.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/gui') diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp index d202d62957..9e979023cd 100644 --- a/src/gui/image/qiconloader.cpp +++ b/src/gui/image/qiconloader.cpp @@ -519,10 +519,11 @@ QPixmap PixmapEntry::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State st return cachedPixmap; } else { if (basePixmap.size() != actualSize) - basePixmap = basePixmap.scaled(actualSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); - cachedPixmap = basePixmap; + cachedPixmap = basePixmap.scaled(actualSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); + else + cachedPixmap = basePixmap; if (QGuiApplication *guiApp = qobject_cast(qApp)) - cachedPixmap = static_cast(QObjectPrivate::get(guiApp))->applyQIconStyleHelper(mode, basePixmap); + cachedPixmap = static_cast(QObjectPrivate::get(guiApp))->applyQIconStyleHelper(mode, cachedPixmap); QPixmapCache::insert(key, cachedPixmap); } return cachedPixmap; -- cgit v1.2.3