only create a new svg item if we don't already have one

This commit is contained in:
Aaron Seigo 2013-02-26 14:39:37 +01:00
parent c7ade82561
commit 4cb892dd04

View File

@ -82,7 +82,9 @@ void IconItem::setSource(const QVariant &source)
m_svgIcon = 0;
} else if (source.canConvert<QString>()) {
if (!m_svgIcon) {
m_svgIcon = new Plasma::Svg(this);
}
//try as a svg toolbar icon
m_svgIcon->setImagePath("toolbar-icons/" + source.toString().split("-").first());