Check for empty sized elements in original SVG

Reviewed-by: Aleix Pol
This commit is contained in:
David Edmundson 2014-07-22 13:35:35 +02:00
parent 0b1bb7edd8
commit bdb0b3b2ca

View File

@ -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);
}
}