[qet] qet/qet: [4909] Element autonumbering. |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 4909
Author: scorpio810
Date: 2017-02-13 12:40:33 +0100 (Mon, 13 Feb 2017)
Log Message:
-----------
Element autonumbering. Add autonumbering menu to assign formulas to
custom element label.
(~/.qet/elements/qet_labels.xml)
Modified Paths:
--------------
trunk/sources/autoNum/assignvariables.cpp
Modified: trunk/sources/autoNum/assignvariables.cpp
===================================================================
--- trunk/sources/autoNum/assignvariables.cpp 2017-02-12 13:13:50 UTC (rev 4908)
+++ trunk/sources/autoNum/assignvariables.cpp 2017-02-13 11:40:33 UTC (rev 4909)
@@ -467,10 +467,21 @@
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);
+ QFile file(customfilepath);
+ file.isReadable();
+ if (!file.open(QFile::ReadOnly | QFile::Text))
+ return QString();
+ }
+
+
+
rxml.setDevice(&file);
rxml.readNext();