From ac023759764935324e7221d6499a8b22569e7759 Mon Sep 17 00:00:00 2001 From: dfochi Date: Wed, 6 Jul 2016 15:19:44 +0000 Subject: [PATCH] Element Auto Numbering now works for all languages. git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4565 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- sources/qetgraphicsitem/customelement.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sources/qetgraphicsitem/customelement.cpp b/sources/qetgraphicsitem/customelement.cpp index 7a5a58b07..4bc1e4ce9 100644 --- a/sources/qetgraphicsitem/customelement.cpp +++ b/sources/qetgraphicsitem/customelement.cpp @@ -271,7 +271,6 @@ void CustomElement::paint(QPainter *qp, const QStyleOptionGraphicsItem *options) 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 @@ void CustomElement::parseLabels() { 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 @@ void CustomElement::parseLabels() { } // 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);