[qet] qet/qet: [5350] Composite text dialog : The combobox propose every informations, not only these currently filled.

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


Revision: 5350
Author:   blacksun
Date:     2018-05-03 11:33:30 +0200 (Thu, 03 May 2018)
Log Message:
-----------
Composite text dialog : The combobox propose every informations, not only these currently filled.

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

Modified: trunk/sources/ui/compositetexteditdialog.cpp
===================================================================
--- trunk/sources/ui/compositetexteditdialog.cpp	2018-05-02 21:32:06 UTC (rev 5349)
+++ trunk/sources/ui/compositetexteditdialog.cpp	2018-05-03 09:33:30 UTC (rev 5350)
@@ -52,41 +52,14 @@
 {
 	QStringList qstrl;
 	
-	if(m_text)
+	if(m_text && (m_text->parentElement()->linkType() & Element::AllReport)) //Special treatment for text owned by a folio report
 	{
-		if(m_text->parentElement()->linkType() & Element::AllReport) //Special treatment for text owned by a folio report
-		{
-			qstrl << "label";
-			
-			if(!m_text->m_watched_conductor.isNull())
-			{
-				Conductor *cond = m_text->m_watched_conductor.data();
-				if (!cond->properties().m_function.isEmpty())
-					qstrl << "function";
-				if(!cond->properties().m_tension_protocol.isEmpty())
-					qstrl << "tension-protocol";
-			}
-		}
-		else
-		{
-			Element *elmt = m_text->elementUseForInfo();
-			if(!elmt)
-				return;
-			
-			QStringList info_list = QETApp::elementInfoKeys();
-			info_list.removeAll("formula"); //No need to have formula
-			DiagramContext dc = elmt->elementInformations();
-			
-			for(QString info : info_list)
-			{
-				if(dc.contains(info))
-					qstrl << info;
-			}
-		}
+		qstrl << "label" << "function" << "tension-protocol";
 	}
 	else
 	{
 		qstrl = QETApp::elementInfoKeys();
+		qstrl.removeAll("formula");
 	}
 	
 		//We use a QMap because the keys of the map are sorted, then no matter the curent local,


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