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

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 5405
Author:   blacksun
Date:     2018-06-21 17:36:03 +0200 (Thu, 21 Jun 2018)
Log Message:
-----------
minor fix : slave link dialog doesn't display the good label, when the label of master element is build from formula.

Modified Paths:
--------------
    trunk/sources/ui/linksingleelementwidget.cpp

Modified: trunk/sources/ui/linksingleelementwidget.cpp
===================================================================
--- trunk/sources/ui/linksingleelementwidget.cpp	2018-06-21 11:24:56 UTC (rev 5404)
+++ trunk/sources/ui/linksingleelementwidget.cpp	2018-06-21 15:36:03 UTC (rev 5405)
@@ -219,9 +219,19 @@
 		{
 			QStringList search_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();
+			}
+			else
+			{
+				str_list << elmt->elementInformations()["label"].toString();
+				if(!str_list.last().isEmpty())
+					search_list << str_list.last();
+			}
 			
 			str_list << elmt->elementInformations()["comment"].toString();
 			if (!str_list.last().isEmpty())


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/