Bug fix : Conductor text with formula that contain %id isn't good when open project (variable %id is replaced by 0 in each folio)

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4746 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2016-10-17 14:26:13 +00:00
parent ccf7e1dbde
commit 6ea169e1f7
6 changed files with 64 additions and 41 deletions

View File

@@ -217,7 +217,8 @@ void DiagramEventAddElement::addElement()
element -> setRotation(m_element -> rotation());
m_diagram -> addItem(element);
QUndoCommand *undo_object = new AddItemCommand<Element *>(element, m_diagram, m_element -> pos());
QUndoCommand *undo_object = new QUndoCommand(tr("Ajouter %1").arg(element->name()));
new AddItemCommand<Element *>(element, m_diagram, m_element -> pos(), undo_object);
while (!element -> AlignedFreeTerminals().isEmpty() && m_diagram -> project() -> autoConductor())
{
@@ -232,8 +233,9 @@ void DiagramEventAddElement::addElement()
ConductorAutoNumerotation can (conductor, m_diagram, undo_object);
can.numerate();
conductor->setSeq = true;
if (m_diagram->freezeNewConductors() || m_diagram->project()->freezeNewConductors() )
conductor->freeze_label = true;
if (m_diagram->freezeNewConductors() || m_diagram->project()->freezeNewConductors()) {
conductor->setFreezeLabel(true);
}
};
m_diagram -> undoStack().push(undo_object);
element->setSequential();