[qet] [2896] Move load of kind information from element to custom element, because the kind information

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 2896
Author:   blacksun
Date:     2014-03-02 12:15:59 +0100 (Sun, 02 Mar 2014)
Log Message:
-----------
Move load of kind information from element to custom element, because the kind information
belong to the element definition, so custom element.

Modified Paths:
--------------
    trunk/sources/qetgraphicsitem/customelement.cpp
    trunk/sources/qetgraphicsitem/element.cpp

Modified: trunk/sources/qetgraphicsitem/customelement.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/customelement.cpp	2014-03-02 11:10:34 UTC (rev 2895)
+++ trunk/sources/qetgraphicsitem/customelement.cpp	2014-03-02 11:15:59 UTC (rev 2896)
@@ -161,6 +161,9 @@
 	// 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;

Modified: trunk/sources/qetgraphicsitem/element.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/element.cpp	2014-03-02 11:10:34 UTC (rev 2895)
+++ trunk/sources/qetgraphicsitem/element.cpp	2014-03-02 11:15:59 UTC (rev 2896)
@@ -398,8 +398,6 @@
 
 	//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 @@
 		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);
 }
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/