mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Fix issues
This commit is contained in:
@@ -117,22 +117,22 @@ bool PartRectangle::fromXml(const QDomElement &qde)
|
||||
stylesFromXml(qde);
|
||||
|
||||
double x, y, w, h, rx, ry;
|
||||
if (propertyDouble(qde, "x", &x, 0) == PropertyFlags::NoValidConversion ||
|
||||
propertyDouble(qde, "y", &y, 0) == PropertyFlags::NoValidConversion)
|
||||
if (propertyDouble(qde, "x", &x, true, 0) == PropertyFlags::NoValidConversion ||
|
||||
propertyDouble(qde, "y", &y, true, 0) == PropertyFlags::NoValidConversion)
|
||||
return false;
|
||||
|
||||
setPos(mapFromScene(x, y));
|
||||
|
||||
if (propertyDouble(qde, "width", &w, 0) == PropertyFlags::NoValidConversion ||
|
||||
propertyDouble(qde, "width", &h, 0) == PropertyFlags::NoValidConversion)
|
||||
if (propertyDouble(qde, "width", &w, true, 0) == PropertyFlags::NoValidConversion ||
|
||||
propertyDouble(qde, "width", &h, true, 0) == PropertyFlags::NoValidConversion)
|
||||
return false;
|
||||
|
||||
QRectF rect(QPointF(0,0), QSizeF(w, h));
|
||||
QRectF rect(QPointF(x,y), QSizeF(w, h));
|
||||
|
||||
setRect(rect.normalized());
|
||||
|
||||
if (propertyDouble(qde, "rx", &rx, 0) == PropertyFlags::NoValidConversion ||
|
||||
propertyDouble(qde, "ry", &ry, 0) == PropertyFlags::NoValidConversion)
|
||||
if (propertyDouble(qde, "rx", &rx, true, 0) == PropertyFlags::NoValidConversion ||
|
||||
propertyDouble(qde, "ry", &ry, true, 0) == PropertyFlags::NoValidConversion)
|
||||
return false;
|
||||
|
||||
setXRadius(rx);
|
||||
|
||||
Reference in New Issue
Block a user