mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-09-13 20:23:04 +02:00
fix terminal data problems
This commit is contained in:
parent
c3c13d5102
commit
1dabe930f2
@ -95,8 +95,8 @@ void TerminalData::fromSettings(QSettings &settings, const QString& prefix)
|
||||
*/
|
||||
void TerminalData::toXmlPriv(QDomElement& xml_element) const
|
||||
{
|
||||
xml_element.setAttribute("x", QString("%1").arg(q->scenePos().x()));
|
||||
xml_element.setAttribute("y", QString("%1").arg(q->scenePos().y()));
|
||||
xml_element.setAttribute("x", m_pos.x());
|
||||
xml_element.setAttribute("y", m_pos.y());
|
||||
|
||||
if (!m_uuid.isNull())
|
||||
xml_element.setAttribute("uuid", m_uuid.toString());
|
||||
@ -164,6 +164,9 @@ bool TerminalData::valideXml(const QDomElement& xml_element) {
|
||||
if (QETXML::propertyDouble(xml_element, "x"))
|
||||
return false;
|
||||
|
||||
if (QETXML::propertyDouble(xml_element, "y"))
|
||||
return false;
|
||||
|
||||
// Old projects do not have this property.
|
||||
// if (QETXML::propertyString(xml_element, "type"))
|
||||
// return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user