Commit 639a04ac authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.ItemLibrary: to not scale null pixmaps



Change-Id: I23c22f3b0f383158814e105058e827e8703fb336
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 67402b35
......@@ -44,6 +44,10 @@ QPixmap ItemLibraryImageProvider::requestPixmap(const QString &id, QSize *size,
size->setWidth(pixmap.width());
size->setHeight(pixmap.height());
}
if (pixmap.isNull())
return pixmap;
if (requestedSize.isValid())
return pixmap.scaled(requestedSize);
return pixmap;
......
......@@ -412,6 +412,9 @@ QIcon ItemLibraryFileIconProvider::icon(const QFileInfo &info) const
pixmap = defaultIcon.pixmap(defaultIcon.actualSize(m_iconSize));
}
if (pixmap.isNull())
return pixmap;
if (pixmap.width() == m_iconSize.width()
&& pixmap.height() == m_iconSize.height())
return pixmap;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment