Minor: %prefix is not hardcoded anymore. Zoom in and out with Ctrl + and Ctrl -

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4574 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
dfochi
2016-07-13 21:25:29 +00:00
parent 7d3e4e18ce
commit ec67d8c408
6 changed files with 37 additions and 5 deletions

View File

@@ -311,12 +311,13 @@ void CustomElement::parseLabels() {
//if there is a formula to assign, assign it
if (!location().project()->elementAutoNumFormula().isEmpty() && this->linkType()!=Element::Slave) {
QString formula = location().project()->elementAutoNumFormula();
formula.replace("%prefix", prefix);
this->setPrefix(prefix);
dc.addValue("label", formula);
this->setTaggedText("label",formula);
} else { //assign only prefix
dc.addValue("label", prefix);
this->setTaggedText("label", prefix);
this->setPrefix(prefix);
dc.addValue("label", "%prefix");
this->setTaggedText("label", "%prefix");
}
this->setElementInformations(dc);
return;
@@ -340,7 +341,7 @@ void CustomElement::parseLabels() {
QString formula = location().project()->elementAutoNumFormula();
DiagramContext &dc = this->rElementInformations();
QString prefix = this->taggedText("label")->toPlainText();
formula.replace("%prefix", prefix);
this->setPrefix(prefix);
dc.addValue("label", formula);
this->setTaggedText("label",formula);
this->setElementInformations(dc);