From 7658de92406c4f5d0a94bb99f6b7d112d99517f6 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Thu, 30 May 2013 11:56:32 +0200 Subject: [PATCH] adapted zvalue if out of boundaries --- src/adaptors/UBSvgSubsetAdaptor.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/adaptors/UBSvgSubsetAdaptor.cpp b/src/adaptors/UBSvgSubsetAdaptor.cpp index af39af0c..c2e5924b 100644 --- a/src/adaptors/UBSvgSubsetAdaptor.cpp +++ b/src/adaptors/UBSvgSubsetAdaptor.cpp @@ -2174,8 +2174,14 @@ void UBSvgSubsetAdaptor::UBSvgSubsetReader::graphicsItemFromSvg(QGraphicsItem* g QStringRef ubZValue = mXmlReader.attributes().value(mNamespaceUri, "z-value"); - if (!ubZValue.isNull()) - UBGraphicsItem::assignZValue(gItem, ubZValue.toString().toFloat()); + if (!ubZValue.isNull()){ + // FIX + // In the firsts zvalue implemenations values outside the boudaries have been used. + // No boundaries specified on documentation but to small values are not correctly handled. + qreal zValue = ubZValue.toString().toFloat(); + while(zValue < -999999) zValue /= 10.; + UBGraphicsItem::assignZValue(gItem, zValue); + } UBItem* ubItem = dynamic_cast(gItem);