mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-23 18:50:52 +01:00
Update conductorproperties.cpp and conductor.cpp
This commit is contained in:
@@ -360,6 +360,7 @@ bool ConductorProperties::fromXml(const QDomElement &e)
|
||||
QMetaEnum me = QMetaEnum::fromType<Qt::Alignment>();
|
||||
|
||||
QString alinment_temp;
|
||||
lksjdflj
|
||||
propertyString(e, "horizontal-alignment", &alinment_temp, "AlignBottom");
|
||||
m_horizontal_alignment = Qt::Alignment(me.keyToValue(alinment_temp.toStdString().data()));
|
||||
propertyString(e, "vertical-alignment", &alinment_temp, "AlignRight");
|
||||
|
||||
@@ -1027,7 +1027,12 @@ QDomElement Conductor::toXml(QDomDocument & doc) const {
|
||||
dom_element.appendChild(dom_seq);
|
||||
|
||||
// Export the properties and text
|
||||
dom_element.appendChild(m_properties.toXml(doc));
|
||||
QDomElement conductorProperties = m_properties.toXml(doc);
|
||||
for (int i=0; i < conductorProperties.childNodes().count(); i++) {
|
||||
QDomNode node = conductorProperties.childNodes().at(i).cloneNode(); // cloneNode() is important!
|
||||
dom_element.appendChild(node);
|
||||
}
|
||||
|
||||
if(m_text_item->wasMovedByUser())
|
||||
{
|
||||
dom_element.appendChild(createXmlProperty(doc, "userx", m_text_item->pos().x()));
|
||||
|
||||
Reference in New Issue
Block a user