mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-20 08:10:52 +01:00
Fix wrong element text value when loading from xml
This commit is contained in:
@@ -190,9 +190,12 @@ void DynamicElementTextItem::fromXml(const QDomElement &dom_elmt)
|
|||||||
|
|
||||||
//Text
|
//Text
|
||||||
QDomElement dom_text = dom_elmt.firstChildElement("text");
|
QDomElement dom_text = dom_elmt.firstChildElement("text");
|
||||||
if (!dom_text.isNull())
|
//Clear the current text.
|
||||||
|
setPlainText("");
|
||||||
|
if (!dom_text.isNull()) {
|
||||||
setText(dom_text.text());
|
setText(dom_text.text());
|
||||||
|
}
|
||||||
|
|
||||||
//Info name
|
//Info name
|
||||||
QDomElement dom_info_name = dom_elmt.firstChildElement("info_name");
|
QDomElement dom_info_name = dom_elmt.firstChildElement("info_name");
|
||||||
if(!dom_info_name.isNull())
|
if(!dom_info_name.isNull())
|
||||||
|
|||||||
@@ -537,8 +537,6 @@ bool Element::parseInput(const QDomElement &dom_element)
|
|||||||
m_converted_text_from_xml_description.insert(deti, p);
|
m_converted_text_from_xml_description.insert(deti, p);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user