Composite text dialog : The combobox propose every informations, not only these currently filled.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5350 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2018-05-03 09:33:30 +00:00
parent 6553af3aee
commit bce0ee0fc7

View File

@@ -52,41 +52,14 @@ void CompositeTextEditDialog::setUpComboBox()
{
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,