mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
read terminal uuid in Terminal and do not write terminal uuid from TerminalData, because Terminal just reads it, only PartTerminal writes the uuid
This commit is contained in:
@@ -72,6 +72,9 @@ bool PartTerminal::fromXmlPriv(const QDomElement &xml_elmt) {
|
||||
*/
|
||||
void PartTerminal::toXmlPriv(QDomElement& e) const {
|
||||
|
||||
if (!d->m_uuid.isNull())
|
||||
e.setAttribute("uuid", d->m_uuid.toString());
|
||||
|
||||
d->m_pos = pos();
|
||||
|
||||
QDomDocument doc = e.ownerDocument();
|
||||
|
||||
@@ -98,8 +98,6 @@ void TerminalData::toXmlPriv(QDomElement& xml_element) const
|
||||
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());
|
||||
xml_element.setAttribute("name", m_name);
|
||||
|
||||
xml_element.setAttribute("orientation",
|
||||
|
||||
@@ -809,8 +809,8 @@ bool Terminal::valideXml(const QDomElement &terminal)
|
||||
*/
|
||||
bool Terminal::fromXmlPriv(const QDomElement &terminal) {
|
||||
QETXML::propertyString(terminal, "number", &number_terminal_);
|
||||
|
||||
QETXML::propertyBool(terminal, "nameHidden", &name_terminal_hidden);
|
||||
QETXML::propertyUuid(terminal, "uuid", &d->m_uuid);
|
||||
|
||||
if(!d->fromXml(terminal))
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user