From 4cb892dd045ed5b88494d10f7b0822148acf7134 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Tue, 26 Feb 2013 14:39:37 +0100 Subject: [PATCH] only create a new svg item if we don't already have one --- src/declarativeimports/core/iconitem.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/declarativeimports/core/iconitem.cpp b/src/declarativeimports/core/iconitem.cpp index b72ff9f55..f61945124 100644 --- a/src/declarativeimports/core/iconitem.cpp +++ b/src/declarativeimports/core/iconitem.cpp @@ -82,7 +82,9 @@ void IconItem::setSource(const QVariant &source) m_svgIcon = 0; } else if (source.canConvert()) { - m_svgIcon = new Plasma::Svg(this); + if (!m_svgIcon) { + m_svgIcon = new Plasma::Svg(this); + } //try as a svg toolbar icon m_svgIcon->setImagePath("toolbar-icons/" + source.toString().split("-").first());