fix load issue

This commit is contained in:
Martin
2021-02-25 16:55:13 +01:00
parent 5430692359
commit f499507b2d

View File

@@ -154,9 +154,9 @@ bool TerminalData::fromXml (const QDomElement &xml_element) // RETURNS True
m_orientation = orientationFromString(o); m_orientation = orientationFromString(o);
QString type; QString type;
if (propertyString(xml_element, "type", &type)) if (propertyString(xml_element, "type", &type) == PropertyFlags::Success)
return false; m_type = typeFromString(type);
m_type = typeFromString(type);
return true; return true;
} }
@@ -164,8 +164,9 @@ bool TerminalData::valideXml(const QDomElement& xml_element) {
if (propertyDouble(xml_element, "x")) if (propertyDouble(xml_element, "x"))
return false; return false;
if (propertyString(xml_element, "type")) // Old projects do not have this property.
return false; // if (propertyString(xml_element, "type"))
// return false;
// legacy elements do not have an uuid // legacy elements do not have an uuid