mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
fix problems in partrectangle
This commit is contained in:
@@ -131,10 +131,10 @@ bool PartRectangle::fromXml(const QDomElement &qde)
|
|||||||
setPos(mapFromScene(x, y));
|
setPos(mapFromScene(x, y));
|
||||||
|
|
||||||
if (propertyDouble(qde, "width", &w) == PropertyFlags::NoValidConversion ||
|
if (propertyDouble(qde, "width", &w) == PropertyFlags::NoValidConversion ||
|
||||||
propertyDouble(qde, "width", &h) == PropertyFlags::NoValidConversion)
|
propertyDouble(qde, "height", &h) == PropertyFlags::NoValidConversion)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
QRectF rect(QPointF(x,y), QSizeF(w, h));
|
QRectF rect(QPointF(0,0), QSizeF(w, h));
|
||||||
|
|
||||||
setRect(rect.normalized());
|
setRect(rect.normalized());
|
||||||
|
|
||||||
@@ -153,7 +153,7 @@ bool PartRectangle::valideXml(QDomElement& element) {
|
|||||||
if ((propertyDouble(element, "x") & PropertyFlags::NoValidConversion) |
|
if ((propertyDouble(element, "x") & PropertyFlags::NoValidConversion) |
|
||||||
(propertyDouble(element, "y") & PropertyFlags::NoValidConversion) |
|
(propertyDouble(element, "y") & PropertyFlags::NoValidConversion) |
|
||||||
(propertyDouble(element, "width") & PropertyFlags::NoValidConversion) |
|
(propertyDouble(element, "width") & PropertyFlags::NoValidConversion) |
|
||||||
(propertyDouble(element, "width") & PropertyFlags::NoValidConversion) |
|
(propertyDouble(element, "height") & PropertyFlags::NoValidConversion) |
|
||||||
(propertyDouble(element, "rx") & PropertyFlags::NoValidConversion) |
|
(propertyDouble(element, "rx") & PropertyFlags::NoValidConversion) |
|
||||||
(propertyDouble(element, "ry") & PropertyFlags::NoValidConversion))
|
(propertyDouble(element, "ry") & PropertyFlags::NoValidConversion))
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user