mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-20 08:10:52 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user