mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-03-06 14:39:59 +01:00
Updated qet_labels xml. Element formula now works with all elements types (logic, hydraulic, pneumatic and energy)
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4679 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -288,7 +288,7 @@ void CustomElement::parseLabels() {
|
||||
}
|
||||
|
||||
// Only Electric labels created so far
|
||||
if (current_location.fileName() != "10_electric") return;
|
||||
//if (current_location.fileName() != "10_electric")
|
||||
QString qet_labels = "10_electric/qet_labels.xml";
|
||||
QString filepath = QETApp::commonElementsDir().append(qet_labels);
|
||||
QFile file(filepath);
|
||||
@@ -335,6 +335,16 @@ void CustomElement::parseLabels() {
|
||||
}
|
||||
rxml.readNext();
|
||||
}
|
||||
if (prefix == "") {
|
||||
if (!(location().project()->elementAutoNumCurrentFormula().isEmpty()) && (location().project()->elementAutoNumCurrentFormula() != "") &&
|
||||
(this->linkType()!=Element::Slave) && (this->linkType()!=Element::Terminale)) {
|
||||
QString formula = location().project()->elementAutoNumCurrentFormula();
|
||||
this->setPrefix(prefix);
|
||||
DiagramContext &dc = this->rElementInformations();
|
||||
dc.addValue("label", formula);
|
||||
this->setTaggedText("label",formula);
|
||||
}
|
||||
}
|
||||
}
|
||||
//apply formula to specific label - This condition specify elements which have different labels e.g KM
|
||||
//that are already specified in the element label (inside .elmt file). This method is not called if elements
|
||||
|
||||
Reference in New Issue
Block a user