Commit 58cf72f5 authored by Claudio Valerio's avatar Claudio Valerio

handlig system where the ',' is used to separate decimals

parent 65ffaf9f
...@@ -280,6 +280,15 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgPolygon(const QDomElement &e ...@@ -280,6 +280,15 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgPolygon(const QDomElement &e
point.setY(sCoord.at(1).toFloat()); point.setY(sCoord.at(1).toFloat());
polygon << point; polygon << point;
} }
else if (sCoord.size() == 4){
//This is the case on system were the "," is used to seperate decimal
QPointF point;
QString x = sCoord.at(0) + "." + sCoord.at(1);
QString y = sCoord.at(2) + "." + sCoord.at(3);
point.setX(x.toFloat());
point.setY(y.toFloat());
polygon << point;
}
else { else {
qWarning() << "cannot make sense of a 'point' value" << sCoord; qWarning() << "cannot make sense of a 'point' value" << sCoord;
} }
...@@ -354,6 +363,15 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgPolyline(const QDomElement & ...@@ -354,6 +363,15 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgPolyline(const QDomElement &
point.setY(sCoord.at(1).toFloat()); point.setY(sCoord.at(1).toFloat());
polygon << point; polygon << point;
} }
else if (sCoord.size() == 4){
//This is the case on system were the "," is used to seperate decimal
QPointF point;
QString x = sCoord.at(0) + "." + sCoord.at(1);
QString y = sCoord.at(2) + "." + sCoord.at(3);
point.setX(x.toFloat());
point.setY(y.toFloat());
polygon << point;
}
else { else {
qWarning() << "cannot make sense of a 'point' value" << sCoord; qWarning() << "cannot make sense of a 'point' value" << sCoord;
} }
......
...@@ -1301,6 +1301,15 @@ UBGraphicsPolygonItem* UBSvgSubsetAdaptor::UBSvgSubsetReader::polygonItemFromPol ...@@ -1301,6 +1301,15 @@ UBGraphicsPolygonItem* UBSvgSubsetAdaptor::UBSvgSubsetReader::polygonItemFromPol
point.setY(sCoord.at(1).toFloat()); point.setY(sCoord.at(1).toFloat());
polygon << point; polygon << point;
} }
else if (sCoord.size() == 4){
//This is the case on system were the "," is used to seperate decimal
QPointF point;
QString x = sCoord.at(0) + "." + sCoord.at(1);
QString y = sCoord.at(2) + "." + sCoord.at(3);
point.setX(x.toFloat());
point.setY(y.toFloat());
polygon << point;
}
else else
{ {
qWarning() << "cannot make sense of a 'point' value" << sCoord; qWarning() << "cannot make sense of a 'point' value" << sCoord;
...@@ -1583,6 +1592,15 @@ QList<UBGraphicsPolygonItem*> UBSvgSubsetAdaptor::UBSvgSubsetReader::polygonItem ...@@ -1583,6 +1592,15 @@ QList<UBGraphicsPolygonItem*> UBSvgSubsetAdaptor::UBSvgSubsetReader::polygonItem
point.setY(sCoord.at(1).toFloat()); point.setY(sCoord.at(1).toFloat());
points << point; points << point;
} }
else if (sCoord.size() == 4){
//This is the case on system were the "," is used to seperate decimal
QPointF point;
QString x = sCoord.at(0) + "." + sCoord.at(1);
QString y = sCoord.at(2) + "." + sCoord.at(3);
point.setX(x.toFloat());
point.setY(y.toFloat());
points << point;
}
else else
{ {
qWarning() << "cannot make sense of a 'point' value" << sCoord; qWarning() << "cannot make sense of a 'point' value" << sCoord;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment