[qet] qet/qet: [5249] Bug fix

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


Revision: 5249
Author:   blacksun
Date:     2018-03-01 19:38:37 +0100 (Thu, 01 Mar 2018)
Log Message:
-----------
Bug fix

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

Modified: trunk/sources/qetgraphicsitem/dynamicelementtextitem.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/dynamicelementtextitem.cpp	2018-03-01 13:36:18 UTC (rev 5248)
+++ trunk/sources/qetgraphicsitem/dynamicelementtextitem.cpp	2018-03-01 18:38:37 UTC (rev 5249)
@@ -345,7 +345,8 @@
 void DynamicElementTextItem::setText(const QString &text)
 {
 	m_text = text;
-	setPlainText(m_text);
+	if(m_text_from == DynamicElementTextItem::UserText)
+		setPlainText(m_text);
 	emit textChanged(m_text);
 }
 
@@ -388,7 +389,7 @@
 		updateLabel();
 		updateXref();
 	}
-	else if(elementUseForInfo()) {
+	else if(elementUseForInfo() && m_text_from == DynamicElementTextItem::ElementInfo) {
 		setPlainText(elementUseForInfo()->elementInformations().value(info_name).toString());
 	}
 	
@@ -440,7 +441,7 @@
 		updateLabel();
 		updateXref();
 	}
-	else
+	else if (m_text_from == DynamicElementTextItem::CompositeText)
 	{
 		DiagramContext dc;
 		if(elementUseForInfo())


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