mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
minor fix
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5087 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -896,6 +896,12 @@ void DynamicElementTextItem::updateReportText()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief DynamicElementTextItem::updateLabel
|
||||
* Update the displayed text, when this dynamic text is based on the label of the parent element.
|
||||
* This function is notably use when the label itself is based from a formula.
|
||||
* If this dynamic text isn't based on label, this function do nothing.
|
||||
*/
|
||||
void DynamicElementTextItem::updateLabel()
|
||||
{
|
||||
if ((m_text_from == ElementInfo && m_info_name == "label") ||
|
||||
@@ -908,7 +914,12 @@ void DynamicElementTextItem::updateLabel()
|
||||
Element *element = elementUseForInfo();
|
||||
|
||||
if(m_text_from == ElementInfo)
|
||||
{
|
||||
if(dc.value("formula").toString().isEmpty())
|
||||
setPlainText(dc.value("label").toString());
|
||||
else
|
||||
setPlainText(autonum::AssignVariables::formulaToLabel(dc.value("formula").toString(), element->rSequenceStruct(), element->diagram(), element));
|
||||
}
|
||||
else if (m_text_from == CompositeText)
|
||||
setPlainText(autonum::AssignVariables::replaceVariable(m_composite_text, dc));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user