[qet] [4565] Element Auto Numbering now works for all languages.

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


Revision: 4565
Author:   dfochi
Date:     2016-07-06 17:19:44 +0200 (Wed, 06 Jul 2016)
Log Message:
-----------
Element Auto Numbering now works for all languages.

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

Modified: trunk/sources/qetgraphicsitem/customelement.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/customelement.cpp	2016-07-06 14:46:53 UTC (rev 4564)
+++ trunk/sources/qetgraphicsitem/customelement.cpp	2016-07-06 15:19:44 UTC (rev 4565)
@@ -271,7 +271,6 @@
 	instructions.
 */
 void CustomElement::parseLabels() {
-	return;
 	if ((this->taggedText("label")!= NULL) && (location().projectId()!=-1) && (this->taggedText("label")->toPlainText()=="_")) { //element is being added
 		QXmlStreamReader rxml;
 		QString path[10];
@@ -281,7 +280,7 @@
 		int dirLevel = -1;
 
 		//Add location name to path array
-		while(current_location.parent().name()!="Imported elements" ) {
+		while(current_location.parent().fileName() != "import") {
 			i++;
 			path[i]=current_location.fileName();
 			current_location = current_location.parent();
@@ -289,7 +288,7 @@
 		}
 
 		// Only Electric labels created so far
-		if (current_location.name()!= "Electric") return;
+		if (current_location.fileName() != "10_electric") return;
 		QString qet_labels = "10_electric/qet_labels.xml";
 		QString filepath = QETApp::commonElementsDir().append(qet_labels);
 		QFile file(filepath);


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