mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
forget file from previous commit
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5719 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -99,6 +99,30 @@ void ConductorAutoNumerotation::applyText(const QString& t)
|
||||
m_diagram->undoStack().push(undo);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ConductorAutoNumerotation::newProperties
|
||||
* Create a new properties according to the current autonum rule of diagram
|
||||
* @param d
|
||||
* @param cp
|
||||
* @param seq
|
||||
*/
|
||||
void ConductorAutoNumerotation::newProperties(Diagram *diagram, ConductorProperties &cp, autonum::sequentialNumbers &seq)
|
||||
{
|
||||
NumerotationContext context = diagram->project()->conductorAutoNum(diagram->conductorsAutonumName());
|
||||
if (context.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
QString autoNum_name = diagram->project()->conductorCurrentAutoNum();
|
||||
QString formula = autonum::numerotationContextToFormula(context);
|
||||
cp.m_formula = formula;
|
||||
|
||||
autonum::setSequential(formula, seq, context, diagram, autoNum_name);
|
||||
|
||||
NumerotationContextCommands ncc (context, diagram);
|
||||
diagram->project()->addConductorAutoNum(autoNum_name, ncc.next());
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ConductorAutoNumerotation::numeratePotential
|
||||
* Numerate a conductor on an existing potential
|
||||
|
||||
Reference in New Issue
Block a user