mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-08 06:42:34 +01:00
Element Autonumbering now has sequential variables and selectautonum widget. Renamed autonumbering variables.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4569 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -309,8 +309,8 @@ void CustomElement::parseLabels() {
|
||||
prefix = rxml.readElementText();
|
||||
DiagramContext &dc = this->rElementInformations();
|
||||
//if there is a formula to assign, assign it
|
||||
if (!location().project()->elementAutoNum().isEmpty() && this->linkType()!=Element::Slave) {
|
||||
QString formula = location().project()->elementAutoNum();
|
||||
if (!location().project()->elementAutoNumFormula().isEmpty() && this->linkType()!=Element::Slave) {
|
||||
QString formula = location().project()->elementAutoNumFormula();
|
||||
formula.replace("%prefix", prefix);
|
||||
dc.addValue("label", formula);
|
||||
this->setTaggedText("label",formula);
|
||||
@@ -336,8 +336,8 @@ void CustomElement::parseLabels() {
|
||||
}
|
||||
//apply formula to specific label
|
||||
else if ((this->taggedText("label")!= NULL) && (location().projectId()!=-1) &&
|
||||
(!location().project()->elementAutoNum().isEmpty()) && (this->linkType()!=Element::Slave)) {
|
||||
QString formula = location().project()->elementAutoNum();
|
||||
(!location().project()->elementAutoNumFormula().isEmpty()) && (this->linkType()!=Element::Slave)) {
|
||||
QString formula = location().project()->elementAutoNumFormula();
|
||||
DiagramContext &dc = this->rElementInformations();
|
||||
QString prefix = this->taggedText("label")->toPlainText();
|
||||
formula.replace("%prefix", prefix);
|
||||
|
||||
Reference in New Issue
Block a user