diff --git a/svg.cpp b/svg.cpp index 0d54faba1..5d93f27cf 100644 --- a/svg.cpp +++ b/svg.cpp @@ -188,12 +188,10 @@ class SvgPrivate QPixmap findInCache(const QString &elementId, const QSizeF &s = QSizeF()) { QSize size; - QString actualElementId; + QString actualElementId(QString("%1-%2-%3").arg(qRound(s.width())).arg( qRound(s.height())).arg(elementId)); if (elementId.isEmpty() || !q->hasElement(actualElementId)) { actualElementId = elementId; - } else { - actualElementId = QString("%1-%2-%3").arg(qRound(s.width())).arg( qRound(s.height())).arg(elementId); } if (elementId.isEmpty() || (multipleImages && s.isValid())) {