mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
Improve autonumbering to assign formulas to custom element label.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4911 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -462,14 +462,6 @@ namespace autonum
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Only Electric labels created so far
|
// 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"){
|
if (current_location.fileName() != "10_electric"){
|
||||||
QString custom_labels = "qet_labels.xml";
|
QString custom_labels = "qet_labels.xml";
|
||||||
QString customfilepath = QETApp::customElementsDir().append(custom_labels);
|
QString customfilepath = QETApp::customElementsDir().append(custom_labels);
|
||||||
@@ -477,10 +469,23 @@ namespace autonum
|
|||||||
file.isReadable();
|
file.isReadable();
|
||||||
if (!file.open(QFile::ReadOnly | QFile::Text))
|
if (!file.open(QFile::ReadOnly | QFile::Text))
|
||||||
return QString();
|
return QString();
|
||||||
}
|
|
||||||
|
|
||||||
rxml.setDevice(&file);
|
rxml.setDevice(&file);
|
||||||
rxml.readNext();
|
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())
|
while(!rxml.atEnd())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user