diff --git a/sources/autoNum/assignvariables.cpp b/sources/autoNum/assignvariables.cpp index c69f23885..1923f01a0 100644 --- a/sources/autoNum/assignvariables.cpp +++ b/sources/autoNum/assignvariables.cpp @@ -462,14 +462,6 @@ namespace autonum } // Only Electric labels created so far - //if (current_location.fileName() != "10_electric") - QString qet_labels = "10_electric/qet_labels.xml"; - QString filepath = QETApp::commonElementsDir().append(qet_labels); - QFile file(filepath); - file.isReadable(); - if (!file.open(QFile::ReadOnly | QFile::Text)) - return QString(); - if (current_location.fileName() != "10_electric"){ QString custom_labels = "qet_labels.xml"; QString customfilepath = QETApp::customElementsDir().append(custom_labels); @@ -477,10 +469,23 @@ namespace autonum file.isReadable(); if (!file.open(QFile::ReadOnly | QFile::Text)) return QString(); - } rxml.setDevice(&file); rxml.readNext(); + } + + if (current_location.fileName() == "10_electric"){ + QString qet_labels = "10_electric/qet_labels.xml"; + QString filepath = QETApp::commonElementsDir().append(qet_labels); + QFile file(filepath); + file.isReadable(); + if (!file.open(QFile::ReadOnly | QFile::Text)) + return QString(); + + rxml.setDevice(&file); + rxml.readNext(); + } + while(!rxml.atEnd()) {