[qet] qet/qet: [5246] Fix : Element text item doesn't display label, when autonum is used.

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


Revision: 5246
Author:   blacksun
Date:     2018-02-26 16:27:42 +0100 (Mon, 26 Feb 2018)
Log Message:
-----------
Fix : Element text item doesn't display label, when autonum is used.

Modified Paths:
--------------
    trunk/sources/qetgraphicsitem/element.cpp

Modified: trunk/sources/qetgraphicsitem/element.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/element.cpp	2018-02-26 10:58:29 UTC (rev 5245)
+++ trunk/sources/qetgraphicsitem/element.cpp	2018-02-26 15:27:42 UTC (rev 5246)
@@ -1284,6 +1284,13 @@
 			autonum::setSequential(formula, m_autoNum_seq, nc, diagram(), element_currentAutoNum);
 			diagram()->project()->addElementAutoNum(element_currentAutoNum, ncc.next());
 		}
+		if(!m_freeze_label && !formula.isEmpty())
+		{
+			DiagramContext dc = m_element_informations;
+			QString label = autonum::AssignVariables::formulaToLabel(formula, m_autoNum_seq, diagram(), this);
+			m_element_informations.addValue("label", label);
+			emit elementInfoChange(dc, m_element_informations);
+		}
 	}
 }
 


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