Element now use the pattern and variable of formula to create the label, both stored in diagram context (instead of the label with a pattern and formula, to create the final label)

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4795 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2016-12-01 09:09:50 +00:00
parent a495675b71
commit c811b02516
10 changed files with 122 additions and 166 deletions

View File

@@ -189,7 +189,7 @@ bool DiagramEventAddElement::buildElement()
//Everything is good
return true;
}
#include "elementtextitem.h"
/**
* @brief DiagramEventAddElement::addElement
* Add an element at the current pos en current rotation,
@@ -237,8 +237,9 @@ void DiagramEventAddElement::addElement()
conductor->setFreezeLabel(true);
}
};
m_diagram -> undoStack().push(undo_object);
element->SetUpSequential();
element->freezeNewAddedElement();
element->setUpFormula();
element->updateLabel();
element->freezeNewAddedElement();
}