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:
dfochi
2016-07-10 01:33:49 +00:00
parent 518f0efd46
commit f8a829d328
23 changed files with 746 additions and 311 deletions

View File

@@ -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);