minor fix : slave link dialog doesn't display the good label, when the label of master element is build from formula.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5405 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2018-06-21 15:36:03 +00:00
parent 627f62f59e
commit 2be0af2f43

View File

@@ -219,9 +219,19 @@ void LinkSingleElementWidget::buildTree()
{ {
QStringList search_list; QStringList search_list;
QStringList str_list; QStringList str_list;
str_list << elmt->elementInformations()["label"].toString();
if (!str_list.last().isEmpty()) QString formula = elmt->elementInformations()["formula"].toString();
if(!formula.isEmpty())
{
str_list << autonum::AssignVariables::formulaToLabel(formula, elmt->rSequenceStruct(), elmt->diagram(), elmt);
search_list << str_list.last(); search_list << str_list.last();
}
else
{
str_list << elmt->elementInformations()["label"].toString();
if(!str_list.last().isEmpty())
search_list << str_list.last();
}
str_list << elmt->elementInformations()["comment"].toString(); str_list << elmt->elementInformations()["comment"].toString();
if (!str_list.last().isEmpty()) if (!str_list.last().isEmpty())