remove default parameter, because it leads only to confusion and errors

This commit is contained in:
Martin Marmsoler
2020-10-10 12:02:38 +02:00
parent 9b8c0101be
commit f18e6bd50f
9 changed files with 40 additions and 52 deletions

View File

@@ -87,13 +87,13 @@ bool PartText::fromXml(const QDomElement &xml_element)
propertyString(xml_element, "text", &text);
setPlainText(text);
double x, y, rot;
if (propertyDouble(xml_element, "x", &x, true, 0) == PropertyFlags::NoValidConversion ||
propertyDouble(xml_element, "y", &y, true, 0) == PropertyFlags::NoValidConversion)
double x=0, y=0, rot=0;
if (propertyDouble(xml_element, "x", &x) == PropertyFlags::NoValidConversion ||
propertyDouble(xml_element, "y", &y) == PropertyFlags::NoValidConversion)
return false;
setPos(x, y);
if (propertyDouble(xml_element, "rotation", &rot, true, 0) == PropertyFlags::NoValidConversion)
if (propertyDouble(xml_element, "rotation", &rot) == PropertyFlags::NoValidConversion)
return false;
setRotation(rot);