mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
Element : variable assignement of label is now managed by an external class instead of the element itself
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4772 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -129,7 +129,7 @@ void MasterElement::initLink(QETProject *project) {
|
||||
*/
|
||||
void MasterElement::folioIdChange() {
|
||||
DiagramContext dc =elementInformations();
|
||||
setTaggedText("label", assignVariables(dc["label"].toString(), this), true);
|
||||
setTaggedText("label", autonum::AssignVariables::formulaToLabel(dc["label"].toString(), m_autoNum_seq, diagram(), this), true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -151,8 +151,7 @@ void MasterElement::changeElementInfo(){
|
||||
*/
|
||||
void MasterElement::updateLabel(DiagramContext old_info, DiagramContext new_info) {
|
||||
QString newstr = new_info["label"].toString();
|
||||
Element *elmt = this;
|
||||
newstr = assignVariables(newstr, elmt);
|
||||
newstr = autonum::AssignVariables::formulaToLabel(newstr, m_autoNum_seq, diagram(), this);
|
||||
|
||||
//Label of element
|
||||
if (old_info["label"].toString() != newstr) {
|
||||
|
||||
Reference in New Issue
Block a user