diff --git a/sources/qetgraphicsitem/customelement.cpp b/sources/qetgraphicsitem/customelement.cpp index f8ecf3327..ce8467d78 100644 --- a/sources/qetgraphicsitem/customelement.cpp +++ b/sources/qetgraphicsitem/customelement.cpp @@ -161,6 +161,9 @@ bool CustomElement::buildFromXml(const QDomElement &xml_def_elmt, int *state) { // extrait les noms de la definition XML names.fromXml(xml_def_elmt); setToolTip(name()); + + //load kind informations + kind_informations_.fromXml(xml_def_elmt.firstChildElement("kindInformations"), "kindInformation"); // parcours des enfants de la definition : parties du dessin int parsed_elements_count = 0; diff --git a/sources/qetgraphicsitem/element.cpp b/sources/qetgraphicsitem/element.cpp index 774af3881..6e4317098 100644 --- a/sources/qetgraphicsitem/element.cpp +++ b/sources/qetgraphicsitem/element.cpp @@ -398,8 +398,6 @@ bool Element::fromXml(QDomElement &e, QHash &table_id_adr, bool //load informations element_informations_.fromXml(e.firstChildElement("elementInformations"), "elementInformation"); - //load kind informations - kind_informations_.fromXml(e.firstChildElement("kindInformations"), "kindInformation"); // position, selection setPos(e.attribute("x").toDouble(), e.attribute("y").toDouble()); @@ -487,14 +485,6 @@ QDomElement Element::toXml(QDomDocument &document, QHash &table element.appendChild(infos); } - //save kind_informations of this element - if (! kind_informations_.keys().isEmpty()) { - QDomElement kind_infos = document.createElement("kindInformations"); - kind_informations_.toXml(kind_infos, "kindInformation"); - element.appendChild(kind_infos); - } - - return(element); }