From bdb0b3b2ca930131184ec0347a23b2f4b54f55f3 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Tue, 22 Jul 2014 13:35:35 +0200 Subject: [PATCH] Check for empty sized elements in original SVG Reviewed-by: Aleix Pol --- src/declarativeimports/core/framesvgitem.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/declarativeimports/core/framesvgitem.cpp b/src/declarativeimports/core/framesvgitem.cpp index 9e9277ec0..a5fe31591 100644 --- a/src/declarativeimports/core/framesvgitem.cpp +++ b/src/declarativeimports/core/framesvgitem.cpp @@ -106,6 +106,12 @@ public: QString elementId = m_frameSvg->frameSvg()->actualPrefix() + FrameSvgHelpers::borderToElementId(m_border); m_elementNativeSize = m_frameSvg->frameSvg()->elementSize(elementId); + if (m_elementNativeSize.isEmpty()) { + //if the default element is empty, we can avoid the slower tiling path + //this also avoids a divide by 0 error + m_fitMode = FastStretch; + } + updateTexture(m_elementNativeSize, elementId, false); } }